diff --git a/library/Director/CustomVariable/CustomVariable.php b/library/Director/CustomVariable/CustomVariable.php index 4fee15f0..3ee08f28 100644 --- a/library/Director/CustomVariable/CustomVariable.php +++ b/library/Director/CustomVariable/CustomVariable.php @@ -89,7 +89,11 @@ abstract class CustomVariable implements IcingaConfigRenderer { $this->modified = $modified; if (! $this->modified) { - $this->storedValue = clone($this->value); + if (is_object($this->value)) { + $this->storedValue = clone($this->value); + } else { + $this->storedValue = $this->value; + } } return $this; @@ -180,7 +184,7 @@ abstract class CustomVariable implements IcingaConfigRenderer } $var->loadedFromDb = true; - $var->modified = false; + $var->setUnmodified(); return $var; }