mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
parent
1993ae2ed2
commit
13085776d8
@ -282,7 +282,7 @@ class Perfdata
|
|||||||
$parts = explode(';', $this->perfdataValue);
|
$parts = explode(';', $this->perfdataValue);
|
||||||
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (preg_match('@^(\d+(\.\d+)?)([a-zA-Z%]{1,2})$@', $parts[0], $matches)) {
|
if (preg_match('@^(-?\d+(\.\d+)?)([a-zA-Z%]{1,2})$@', $parts[0], $matches)) {
|
||||||
$this->unit = strtolower($matches[3]);
|
$this->unit = strtolower($matches[3]);
|
||||||
$this->value = self::convert($matches[1], $this->unit);
|
$this->value = self::convert($matches[1], $this->unit);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user