From 717636197b8427331ca9952de3f912a13b8a8d8f Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Thu, 7 May 2026 08:12:57 +0200 Subject: [PATCH] IcingaRedis: Do not fail while fetching last heartbeat fixes #1372 --- library/Icingadb/Common/IcingaRedis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icingadb/Common/IcingaRedis.php b/library/Icingadb/Common/IcingaRedis.php index 3e9a1293..53d302b6 100644 --- a/library/Icingadb/Common/IcingaRedis.php +++ b/library/Icingadb/Common/IcingaRedis.php @@ -188,7 +188,7 @@ class IcingaRedis $rs = $redis->xread(1, null, [$stream], '0'); if (is_array($rs)) { - $timestampKeyPos = array_search('timestamp', $rs[$stream][0][1], true); + $timestampKeyPos = array_search('timestamp', $rs[$stream][0][1] ?? [], true); if ($timestampKeyPos !== false && isset($rs[$stream][0][1][$timestampKeyPos + 1])) { return $rs[$stream][0][1][$timestampKeyPos + 1] / 1000;