diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index 5e379f32754..44a9e2d561c 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -830,7 +830,7 @@ public function getSiteTreeFor($className, $rootID = null, $childrenMethod = nul // match the filter criteria until they're queried (and matched up with previously marked nodes). $nodeThresholdLeaf = Config::inst()->get('Hierarchy', 'node_threshold_leaf'); if($nodeThresholdLeaf && !$filterFunction) { - $nodeCountCallback = function($parent, $numChildren) use($controller, $className, $nodeThresholdLeaf) { + $nodeCountCallback = function($parent, $numChildren) use(&$controller, $className, $nodeThresholdLeaf) { if($className == 'SiteTree' && $parent->ID && $numChildren > $nodeThresholdLeaf) { return sprintf( '