diff options
author | Joas Schilling <coding@schilljs.com> | 2020-11-16 16:37:02 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-11-16 16:37:02 +0300 |
commit | a0fbdc03f280fdf5947e63a9bec0468a44b6e440 (patch) | |
tree | ab09cb26c8254f298adda0cb58ad283d0945977c /lib | |
parent | 23bfbd02b9332faf509077f6000ae3642c86a8a1 (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.php | 2 |
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) { |