From 80df0e492e4fb40b4e2c82981d4b7dac9ca0ffd5 Mon Sep 17 00:00:00 2001 From: Miguel Ribeiro Date: Mon, 15 Jul 2024 21:36:53 +0200 Subject: [PATCH] fix: test ntfy without custom headers --- endpoints/notifications/testntfynotifications.php | 3 +++ includes/version.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/endpoints/notifications/testntfynotifications.php b/endpoints/notifications/testntfynotifications.php index 1f7efb06c..26f0ba0e6 100644 --- a/endpoints/notifications/testntfynotifications.php +++ b/endpoints/notifications/testntfynotifications.php @@ -26,6 +26,9 @@ $host = rtrim($data["host"], '/'); $topic = $data["topic"]; $headers = json_decode($data["headers"], true); + if ($headers === null) { + $headers = []; + } $customheaders = array_map(function ($key, $value) { return "$key: $value"; }, array_keys($headers), $headers); diff --git a/includes/version.php b/includes/version.php index 70d9561e7..41e33ad23 100644 --- a/includes/version.php +++ b/includes/version.php @@ -1,3 +1,3 @@ \ No newline at end of file