Merge pull request #2252 from zemiacsik/patch-1

fixed deprecated create_function() in PHP 7.2
This commit is contained in:
Robbie Averill 2018-09-06 12:48:36 +02:00 committed by GitHub
commit 5ecd0c98de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2113,7 +2113,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// This filter ensures that the ParentID dropdown selection does not show this node,
// or its descendents, as this causes vanishing bugs
$parentIDField->setFilterFunction(create_function('$node', "return \$node->ID != {$this->ID};"));
$parentIDField->setFilterFunction(function($node) { return $node->ID != $this->ID; });
$parentTypeSelector->addExtraClass('parentTypeSelector');
$tabBehaviour->setTitle(_t('SiteTree.TABBEHAVIOUR', "Behavior"));