CustomVariables: clone values on set...

...just to be on the safe side
This commit is contained in:
Thomas Gelf 2016-02-22 10:59:30 +01:00
parent e3d38f718f
commit febd44a318
1 changed files with 3 additions and 1 deletions

View File

@ -67,7 +67,9 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer
{
$key = (string) $key;
if (! $value instanceof CustomVariable) {
if ($value instanceof CustomVariable) {
$value = clone($value);
} else {
$value = CustomVariable::create($key, $value);
}