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…
Reference in New Issue