From 4f08db3c016e0841d5fa9b443ba4c0e7956b89ed Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 29 Jun 2022 13:26:08 +0200 Subject: [PATCH] VolatileStateResults: Don't override `is_overdue` refs #566 --- library/Icingadb/Redis/VolatileStateResults.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/Icingadb/Redis/VolatileStateResults.php b/library/Icingadb/Redis/VolatileStateResults.php index abcf1f14..58a985c0 100644 --- a/library/Icingadb/Redis/VolatileStateResults.php +++ b/library/Icingadb/Redis/VolatileStateResults.php @@ -151,9 +151,10 @@ class VolatileStateResults extends ResultSet foreach ($results as $i => $json) { if ($json !== null) { $data = json_decode($json, true); - $data = array_intersect_key(array_merge(array_fill_keys($keys, null), $data), array_flip($keys)); + $keyMap = array_fill_keys($keys, null); + unset($keyMap['is_overdue']); // Is calculated by Icinga DB, not Icinga 2, hence it's never in redis - yield $ids[$i] => $data; + yield $ids[$i] => array_intersect_key(array_merge($keyMap, $data), $keyMap); } } }