diff --git a/library/Director/CustomVariable/CustomVariables.php b/library/Director/CustomVariable/CustomVariables.php index f5de9b72..b080ebb9 100644 --- a/library/Director/CustomVariable/CustomVariables.php +++ b/library/Director/CustomVariable/CustomVariables.php @@ -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); }