diff --git a/library/Director/Objects/IcingaObjectGroups.php b/library/Director/Objects/IcingaObjectGroups.php index 7f2f1222..0394573a 100644 --- a/library/Director/Objects/IcingaObjectGroups.php +++ b/library/Director/Objects/IcingaObjectGroups.php @@ -82,10 +82,10 @@ class IcingaObjectGroups implements Iterator, Countable, IcingaConfigRenderer $class = $this->getGroupClass(); foreach ($group as $g) { - if ($group instanceof $class) { - $new[] = $group->object_name; + if ($g instanceof $class) { + $new[] = $g->object_name; } else { - $new[] = $group; + $new[] = $g; } } sort($existing);