mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 17:24:18 +02:00
IcingaObjectFieldLoader: do not fail on emtpy...
...parents
This commit is contained in:
parent
9e977eaf9a
commit
e04acbc55f
@ -146,16 +146,17 @@ class IcingaObjectFieldLoader
|
||||
|
||||
protected function loadDataFieldsForObjects($objectList)
|
||||
{
|
||||
if (empty($objectList)) {
|
||||
// Or should we fail?
|
||||
return array();
|
||||
}
|
||||
|
||||
$ids = array();
|
||||
$objects = array();
|
||||
foreach ($objectList as $object) {
|
||||
$ids[] = $object->id;
|
||||
$objects[$object->id] = $object;
|
||||
if ($object->hasBeenLoadedFromDb()) {
|
||||
$ids[] = $object->id;
|
||||
$objects[$object->id] = $object;
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($ids)) {
|
||||
return array();
|
||||
}
|
||||
|
||||
$connection = $object->getConnection();
|
||||
|
Loading…
x
Reference in New Issue
Block a user