Sync: initialize empty array only for combined keys

This commit is contained in:
Thomas Gelf 2016-02-25 00:10:40 +01:00
parent b9ee674d3f
commit 79f4aec592

View File

@ -444,11 +444,11 @@ class Sync
protected function loadExistingObjects() protected function loadExistingObjects()
{ {
$this->objects = array();
// TODO: Make object_type (template, object...) and object_name mandatory? // TODO: Make object_type (template, object...) and object_name mandatory?
if ($this->hasCombinedKey()) { if ($this->hasCombinedKey()) {
$this->objects = array();
foreach (IcingaObject::loadAllByType( foreach (IcingaObject::loadAllByType(
$this->rule->object_type, $this->rule->object_type,
$this->db $this->db