FieldLoader: do not add NULL id to list of objects

fixes #1102
This commit is contained in:
Thomas Gelf 2017-08-25 09:28:47 +02:00
parent 5450a00c78
commit bd0ccc6ca4
1 changed files with 3 additions and 1 deletions

View File

@ -449,7 +449,9 @@ class IcingaObjectFieldLoader
} }
$ids = $object->listAncestorIds(); $ids = $object->listAncestorIds();
$ids[] = $object->getProperty('id'); if ($id = $object->getProperty('id')) {
$ids[] = $id;
}
return $this->fetchFieldDetailsForIds($ids); return $this->fetchFieldDetailsForIds($ids);
} }