Perfdata: Avoid passing null to number_format()

This commit is contained in:
Johannes Meyer 2022-05-27 14:41:42 +02:00
parent 6fe2ef4698
commit 777d146ba1

View File

@ -474,7 +474,7 @@ class Perfdata
$html ? '<b>%s %s</b> (%s%%)' : '%s %s (%s%%)',
htmlspecialchars($this->getLabel()),
$this->format($this->value),
number_format($this->getPercentage(), 2)
number_format($this->getPercentage() ?? 0, 2)
);
}