mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-08-17 15:58:10 +02:00
CustomVariable: more care when cloning
This commit is contained in:
parent
070d05d4a8
commit
2ba404c2c7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user