IcingaObjectGroups: keep id when cloning groups

Before this fix we lost autoincrement ids on clone, resulting in
ill-constructed queries on deletion

fixes #11508
This commit is contained in:
Thomas Gelf 2016-05-20 08:47:07 +02:00
parent 5952de5841
commit 1c79807500
1 changed files with 3 additions and 0 deletions

View File

@ -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()