From b7c04acd2eb80d8b0911fe15642edb1875254cb8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 23 Jul 2026 09:48:39 +0200 Subject: [PATCH] fix(push): Fix undefined index when accessing token age 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 3744dd582..adbe60053 100644 --- a/lib/Push.php +++ b/lib/Push.php @@ -292,7 +292,7 @@ protected function filterByTokenAge(array $devices): array { $tokenAgeList = array_slice($tokenAgeList, 0, self::DEVICE_LIMIT); $devices = []; foreach ($deviceList as $device) { - if (!isset($tokenAgeList[$device['token']]) && $tokenAgeList[$device['token']] !== 0) { + if (!isset($tokenAgeList[$device['token']]) || $tokenAgeList[$device['token']] !== 0) { $this->printInfo('Device token ' . $device['token'] . ' is not in the most recent 20 devices: ' . $tokenAgeList[$device['token']] . ''); continue; }