mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-12 16:34:25 +02:00
parent
e006902254
commit
7865db9053
@ -111,7 +111,7 @@ class Perfdata
|
|||||||
{
|
{
|
||||||
if (empty($perfdata)) {
|
if (empty($perfdata)) {
|
||||||
throw new InvalidArgumentException('Perfdata::fromString expects a string with content');
|
throw new InvalidArgumentException('Perfdata::fromString expects a string with content');
|
||||||
} elseif (false === strpos($perfdata, '=')) {
|
} elseif (strpos($perfdata, '=') === false) {
|
||||||
throw new InvalidArgumentException(
|
throw new InvalidArgumentException(
|
||||||
'Perfdata::fromString expects a key=value formatted string. Got "' . $perfdata . '" instead'
|
'Perfdata::fromString expects a key=value formatted string. Got "' . $perfdata . '" instead'
|
||||||
);
|
);
|
||||||
@ -211,8 +211,8 @@ class Perfdata
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($this->maxValue !== null) {
|
if ($this->maxValue !== null) {
|
||||||
$minValue = $this->minValue !== null ? $this->minValue : 0;
|
$minValue = $this->minValue !== null ? $this->minValue : 0.0;
|
||||||
if ((float) ($this->maxValue - $minValue) === 0.0) {
|
if ($this->maxValue == $minValue) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user