IcingaObject: fix 'empty' check for relation property

This commit is contained in:
Thomas Gelf 2016-03-07 18:07:36 +01:00
parent aee62754ce
commit b3a44bd7dd

View File

@ -290,7 +290,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
} }
if ($this->hasRelation($key)) { if ($this->hasRelation($key)) {
if (! $value) { if (strlen($value) === 0) {
return parent::set($key . '_id', null); return parent::set($key . '_id', null);
} }