From a0fbdc03f280fdf5947e63a9bec0468a44b6e440 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 16 Nov 2020 14:37:02 +0100 Subject: [PATCH] Don't log when unknown array is null Signed-off-by: Joas Schilling --- lib/Push.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Push.php b/lib/Push.php index 18efc5784..902f41469 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -318,7 +318,7 @@ protected function sendNotificationsToProxies(): void { $body = $response->getBody(); $bodyData = json_decode($body, true); - if (is_array($bodyData) && isset($bodyData['unknown'], $bodyData['failed'])) { + if (is_array($bodyData) && array_key_exists('unknown', $bodyData) && array_key_exists('failed', $bodyData)) { if (is_array($bodyData['unknown'])) { // Proxy returns null when the array is empty foreach ($bodyData['unknown'] as $unknownDevice) {