Perfdata::getPercentage(): prevent division by integer 0

fixes #10331
This commit is contained in:
Alexander A. Klimov 2015-12-15 17:32:45 +01:00
parent 7983a87f52
commit aad7baa5c4
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ class Perfdata
if ($this->maxValue !== null) {
$minValue = $this->minValue !== null ? $this->minValue : 0;
if ($this->maxValue - $minValue === 0.0) {
if ((float) ($this->maxValue - $minValue) === 0.0) {
return null;
}