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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102649 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 03:22:12 +00:00
parent dad685e2e2
commit 28fd09115a

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;