CustomVariable: fix nested vars
This commit is contained in:
parent
5d363374ad
commit
b9a4820515
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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?
|
||||
|
|
Loading…
Reference in New Issue