SyncPropertyForm: non-Icinga objects should not fail

This commit is contained in:
Thomas Gelf 2016-02-17 22:23:52 +01:00
parent f03503492a
commit 215f42926f
1 changed files with 3 additions and 3 deletions

View File

@ -250,7 +250,7 @@ class SyncPropertyForm extends DirectorObjectForm
//if (preg_match('~_id$~', $prop)) continue; //if (preg_match('~_id$~', $prop)) continue;
if (substr($prop, -3) === '_id') { if (substr($prop, -3) === '_id') {
$prop = substr($prop, 0, -3); $prop = substr($prop, 0, -3);
if (! $dummy->hasRelation($prop)) { if (! $dummy instanceof IcingaObject || ! $dummy->hasRelation($prop)) {
continue; continue;
} }
} }