CustomVariables: unset var if set to plain null

...but still allow for Null variables
This commit is contained in:
Thomas Gelf 2016-10-05 17:20:25 +00:00
parent 56fece6a15
commit c859055221
1 changed files with 4 additions and 0 deletions

View File

@ -77,6 +77,10 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer
if ($value instanceof CustomVariable) {
$value = clone($value);
} else {
if ($value === null) {
$this->__unset($key);
return $this;
}
$value = CustomVariable::create($key, $value);
}