Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/notifications.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-16 16:37:02 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-11-16 19:41:27 +0300
commit7d969806ec9b72a30494540bea39fa49905105bd (patch)
treefb08c4e927aa883f664e5994c3ec54d6e9beae02
parent9706ec9842a011be9890a20083bc23aae04cf46e (diff)
Don't log when unknown array is null
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/Push.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Push.php b/lib/Push.php
index 18efc57..902f414 100644
--- a/lib/Push.php
+++ b/lib/Push.php
@@ -318,7 +318,7 @@ class Push {
$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) {