Fix division by zero in Perfdata.php
Fixes #5708 Signed-off-by: Michael Friedrich <Michael.Friedrich@netways.de>
This commit is contained in:
parent
ea44ae3693
commit
e6bb32be64
|
@ -100,6 +100,7 @@ class Perfdata
|
||||||
}
|
}
|
||||||
$step = $key;
|
$step = $key;
|
||||||
}
|
}
|
||||||
|
if ($step <= 0) $step = 1;
|
||||||
return $prefix
|
return $prefix
|
||||||
. number_format($val / $step, 1, ',', '.')
|
. number_format($val / $step, 1, ',', '.')
|
||||||
. ' '
|
. ' '
|
||||||
|
|
Loading…
Reference in New Issue