mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: pass controller as reference inside closure.
Non referenced causes segfaults on PHP <= 5.3.8 environments when opening subtrees in the CMS. Likely the cause of silverstripe-cms/issues/803.
This commit is contained in:
parent
bacf0f6171
commit
919a8c21c3
@ -830,7 +830,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
||||
// 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(
|
||||
'<ul><li class="readonly"><span class="item">'
|
||||
|
Loading…
Reference in New Issue
Block a user