[icinga-checkins] icinga.org: icingaweb2-module-director/master: Sync: initialize empty array only for combined keys

git at icinga.org git at icinga.org
Thu Feb 25 00:10:59 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 79f4aec592789de93c9a9b5adb369371f4d62de9
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=79f4aec592789de93c9a9b5adb369371f4d62de9

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu Feb 25 00:10:40 2016 +0100

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 4c543ca..391ac43 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



More information about the icinga-checkins mailing list