From f0ca81d7af6d7cb0b777877e786f26e637b60821 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Wed, 12 Nov 2014 11:47:42 +0100 Subject: [PATCH] Data\Filter: SORT_NATURAL only for PHP >= 5.4 --- library/Icinga/Data/Filter/Filter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Icinga/Data/Filter/Filter.php b/library/Icinga/Data/Filter/Filter.php index 64607a4a0..99b0290f1 100644 --- a/library/Icinga/Data/Filter/Filter.php +++ b/library/Icinga/Data/Filter/Filter.php @@ -79,7 +79,7 @@ abstract class Filter } } - krsort($operators, SORT_NATURAL); + krsort($operators, version_compare(PHP_VERSION, '5.4.0') >= 0 ? SORT_NATURAL : SORT_REGULAR); foreach ($operators as $id => $operator) { $f = $filter->getById($id); if ($f->getOperatorName() !== $operator) {