diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index d208ecab8..21823d77a 100755 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -369,7 +369,7 @@ class Hierarchy extends DataObjectDecorator { continue; } $idList[] = $child->ID; - $child->loadDescendantIDListInto($idList); + $child->getExtensionInstance('Hierarchy')->loadDescendantIDListInto($idList); } } } @@ -413,7 +413,7 @@ class Hierarchy extends DataObjectDecorator { // Cache the allChildren data, so that future requests will return the references to the same // object. This allows the mark..() system to work appropriately. if(!$this->_cache_allChildren) { - $this->_cache_allChildren = $this->owner->stageChildren(true); + $this->_cache_allChildren = $this->owner ? $this->owner->stageChildren(true) : null; } return $this->_cache_allChildren;