CustomVariable: fix nested vars

This commit is contained in:
Thomas Gelf 2015-08-28 18:33:08 +02:00
parent 5d363374ad
commit b9a4820515
2 changed files with 4 additions and 4 deletions

View File

@ -128,8 +128,8 @@ abstract class CustomVariable implements IcingaConfigRenderer
} elseif (is_array($value)) {
foreach (array_keys($value) as $key) {
if (! is_int($key) || ctype_digit($key)) {
foreach (array_keys($value) as $k) {
if (! is_int($k) || ctype_digit($k)) {
return new CustomVariableDictionary($key, $value);
}
}

View File

@ -39,8 +39,8 @@ class CustomVariableArray extends CustomVariable
{
$new = array();
foreach ($value as $key => $val) {
$new[$key] = self::wantCustomVariable($key, $val);
foreach ($value as $k => $v) {
$new[] = self::wantCustomVariable($k, $v);
}
// WTF?