BUGFIX #5044 Hierarchy::loadDescendantIDListInto() now uses Object::getExtensionInstance('Hierarchy') instead of going through __call(), as PHP 5.3 has issues converting references to values

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98382 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2010-02-08 02:44:34 +00:00 committed by Sam Minnee
parent 062975d30a
commit 9cf6bd8c7c

View File

@ -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;