IcingaObject: unmodified object should be an object

This commit is contained in:
Thomas Gelf 2016-03-08 21:30:12 +01:00
parent ef50386cd7
commit 23333f1b77

View File

@ -1467,6 +1467,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
public function getPlainUnmodifiedObject() public function getPlainUnmodifiedObject()
{ {
$props = array(); $props = array();
foreach ($this->getOriginalProperties() as $k => $v) { foreach ($this->getOriginalProperties() as $k => $v) {
// Do not ship ids for IcingaObjects: // Do not ship ids for IcingaObjects:
if ($k === 'id' && $this->hasProperty('object_name')) { if ($k === 'id' && $this->hasProperty('object_name')) {
@ -1517,7 +1518,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$props[$property] = $set->getPlainUnmodifiedObject(); $props[$property] = $set->getPlainUnmodifiedObject();
} }
return $props; return (object) $props;
} }
public function __toString() public function __toString()