From 43fc6fc42ba49a19c81c102c3324e5969f6b2ef5 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 31 Jul 2015 14:46:20 +0200 Subject: [PATCH] CustomVariables: clone vars, may not suffice --- library/Director/CustomVariable/CustomVariables.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/Director/CustomVariable/CustomVariables.php b/library/Director/CustomVariable/CustomVariables.php index 5e3991c0..61aa6cc8 100644 --- a/library/Director/CustomVariable/CustomVariables.php +++ b/library/Director/CustomVariable/CustomVariables.php @@ -174,7 +174,10 @@ class CustomVariables implements Iterator, Countable, IcingaConfigRenderer public function setUnmodified() { $this->modified = false; - $this->storedVars = $this->vars; + $this->storedVars = array(); + foreach ($this->vars as $key => $var) { + $this->storedVars[$key] = clone($var); + } return $this; }