From 0eb014139945b3c8dbedccebb64615f5ca124cdc Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 18 Jun 2021 23:01:58 +0200 Subject: [PATCH] Fix casting token to int Signed-off-by: Joas Schilling --- lib/Push.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Push.php b/lib/Push.php index 571059c5d..495015c66 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -211,6 +211,7 @@ public function pushToDevice(int $id, INotification $notification, ?OutputInterf $maxAge = time() - 60 * 24 * 60 * 60; foreach ($devices as $device) { + $device['token'] = (int) $device['token']; $this->printInfo(''); $this->printInfo('Device token:' . $device['token']); @@ -262,6 +263,7 @@ public function pushDeleteToDevice(string $userId, int $notificationId, string $ $userKey = $this->keyManager->getKey($user); foreach ($devices as $device) { + $device['token'] = (int) $device['token']; if (!$this->validateToken($device['token'], $maxAge)) { // Token does not exist anymore continue;