From 931effcf6886e1dd3688dcf756fe2b1b7bc036d9 Mon Sep 17 00:00:00 2001 From: Yonas Habteab Date: Thu, 26 Jan 2023 11:19:30 +0100 Subject: [PATCH] SlaReport: Handle `null` sla results correctly --- library/Icingadb/ProvidedHook/Reporting/SlaReport.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/Icingadb/ProvidedHook/Reporting/SlaReport.php b/library/Icingadb/ProvidedHook/Reporting/SlaReport.php index b5898fd83..b9815eb7a 100644 --- a/library/Icingadb/ProvidedHook/Reporting/SlaReport.php +++ b/library/Icingadb/ProvidedHook/Reporting/SlaReport.php @@ -112,6 +112,10 @@ protected function fetchReportData(Timerange $timerange, array $config = null) } } else { foreach ($this->fetchSla($timerange, $filter) as $row) { + if ($row->sla === null) { + $row->sla = 0.0; + } + $rows[] = $this->createReportRow($row); } }