From 1c798075000c9b0c6fa5360625fdf82247847d7a Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 20 May 2016 08:47:07 +0200 Subject: [PATCH] IcingaObjectGroups: keep id when cloning groups Before this fix we lost autoincrement ids on clone, resulting in ill-constructed queries on deletion fixes #11508 --- library/Director/Objects/IcingaObjectGroups.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/Director/Objects/IcingaObjectGroups.php b/library/Director/Objects/IcingaObjectGroups.php index d3eb94bf..7b5d2928 100644 --- a/library/Director/Objects/IcingaObjectGroups.php +++ b/library/Director/Objects/IcingaObjectGroups.php @@ -304,7 +304,10 @@ class IcingaObjectGroups implements Iterator, Countable, IcingaConfigRenderer $this->storedGroups = array(); foreach ($this->groups as $k => $v) { $this->storedGroups[$k] = clone($v); + $this->storedGroups[$k]->id = $v->id; } + + $this->modified = false; } protected function getGroupClass()