IcingaObject: fix resolveProperty in combination...
...with lazy-set properties
This commit is contained in:
parent
123b4c7549
commit
cb825b5b94
|
@ -610,6 +610,11 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
|
|||
|
||||
public function getResolvedProperty($key, $default = null)
|
||||
{
|
||||
if (array_key_exists($key, $this->unresolvedRelatedProperties)) {
|
||||
$this->resolveUnresolvedRelatedProperty($key);
|
||||
$this->invalidateResolveCache();
|
||||
}
|
||||
|
||||
$properties = $this->getResolvedProperties();
|
||||
if (property_exists($properties, $key)) {
|
||||
return $properties->$key;
|
||||
|
|
Loading…
Reference in New Issue