fixed deprecated create_function() in PHP 7.2

fixed for "PHP Deprecated:  Function create_function() is deprecated in \cms\code\model\SiteTree.php on line 2116" while using PHP 7.2
This commit is contained in:
zemiacsik 2018-09-05 14:49:31 +02:00 committed by GitHub
parent be348af3eb
commit 4acf401b71
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"));