mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
MINOR Allowing NULL returns from getRecord() in LeftAndMain->getSiteTreeFor()
This commit is contained in:
parent
51c02289da
commit
be68450ce1
@ -485,7 +485,8 @@ class LeftAndMain extends Controller {
|
||||
if (!$numChildrenMethod) $numChildrenMethod = 'numChildren';
|
||||
|
||||
// Get the tree root
|
||||
$obj = $rootID ? $this->getRecord($rootID) : singleton($className);
|
||||
$record = ($rootID) ? $this->getRecord($rootID) : null;
|
||||
$obj = $record ? $record : singleton($className);
|
||||
|
||||
// Mark the nodes of the tree to return
|
||||
if ($filterFunction) $obj->setMarkingFilterFunction($filterFunction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user