From 79f4aec592789de93c9a9b5adb369371f4d62de9 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Thu, 25 Feb 2016 00:10:40 +0100 Subject: [PATCH] Sync: initialize empty array only for combined keys --- library/Director/Import/Sync.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/Director/Import/Sync.php b/library/Director/Import/Sync.php index 4c543ca5..391ac43f 100644 --- a/library/Director/Import/Sync.php +++ b/library/Director/Import/Sync.php @@ -444,11 +444,11 @@ class Sync protected function loadExistingObjects() { - $this->objects = array(); - // TODO: Make object_type (template, object...) and object_name mandatory? if ($this->hasCombinedKey()) { + $this->objects = array(); + foreach (IcingaObject::loadAllByType( $this->rule->object_type, $this->db