From 777d146ba146b00e29f334f93de567dc491fbf28 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 27 May 2022 14:41:42 +0200 Subject: [PATCH] Perfdata: Avoid passing null to `number_format()` --- modules/monitoring/library/Monitoring/Plugin/Perfdata.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/monitoring/library/Monitoring/Plugin/Perfdata.php b/modules/monitoring/library/Monitoring/Plugin/Perfdata.php index bafb49f49..476354a66 100644 --- a/modules/monitoring/library/Monitoring/Plugin/Perfdata.php +++ b/modules/monitoring/library/Monitoring/Plugin/Perfdata.php @@ -474,7 +474,7 @@ class Perfdata $html ? '%s %s (%s%%)' : '%s %s (%s%%)', htmlspecialchars($this->getLabel()), $this->format($this->value), - number_format($this->getPercentage(), 2) + number_format($this->getPercentage() ?? 0, 2) ); }