mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
dad685e2e2
commit
28fd09115a
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user