IcingaConfigHelper: use string-based sort for...

...dictionary fields to make PHP 5.x and PHP 7.x produce the same output.

refs #12591
This commit is contained in:
Thomas Gelf 2016-09-07 20:44:03 +00:00
parent e58a70613c
commit 4cd399e059
2 changed files with 2 additions and 2 deletions

View File

@ -149,7 +149,7 @@ class IcingaConfigHelper
if (empty($vals)) { if (empty($vals)) {
return '{}'; return '{}';
} }
ksort($vals); ksort($vals, SORT_STRING);
// Prefix for toConfigString? // Prefix for toConfigString?
return "{\n" . implode("\n", $vals) . "\n}"; return "{\n" . implode("\n", $vals) . "\n}";

View File

@ -1,6 +1,6 @@
{ {
"0" = numeric
@include = reserved @include = reserved
key1 = bla key1 = bla
"spe cial" = value "spe cial" = value
"0" = numeric
} }