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
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-11-16 16:37:02 +0300
committerJoas Schilling <coding@schilljs.com>2020-11-16 16:37:02 +0300
commita0fbdc03f280fdf5947e63a9bec0468a44b6e440 (patch)
treeab09cb26c8254f298adda0cb58ad283d0945977c /lib
parent23bfbd02b9332faf509077f6000ae3642c86a8a1 (diff)
Don't log when unknown array is null
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-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) {