ThresholdRange: trim() raw ranges

refs #8194
This commit is contained in:
Alexander A. Klimov 2016-04-27 10:26:49 +02:00 committed by Johannes Meyer
parent 5df6eeaeaf
commit ddde4b447c
1 changed files with 4 additions and 1 deletions

View File

@ -40,6 +40,7 @@ class ThresholdRange
{
$range = new static();
$rawRange = ltrim($rawRange);
if (strpos($rawRange, '@') === 0) {
$range->setInverted(true);
$rawRange = substr($rawRange, 1);
@ -47,9 +48,11 @@ class ThresholdRange
if (strpos($rawRange, ':') === false) {
$min = 0.0;
$max = floatval($rawRange);
$max = trim(floatval($rawRange));
} else {
list($min, $max) = explode(':', $rawRange, 2);
$min = trim($min);
$max = trim($max);
switch ($min) {
case '':