mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: PHP 5.1 requires an array rather than a string for call_user_func() (from r100367)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105553 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e5eff98e15
commit
5db5bbf9df
@ -997,6 +997,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
static function prepopuplate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) {
|
static function prepopuplate_permission_cache($permission = 'CanEditType', $ids, $batchCallback = null) {
|
||||||
if(!$batchCallback) $batchCallback = "SiteTree::can_{$permission}_multiple";
|
if(!$batchCallback) $batchCallback = "SiteTree::can_{$permission}_multiple";
|
||||||
|
|
||||||
|
//PHP 5.1 requires an array rather than a string for the call_user_func function
|
||||||
|
$batchCallback=explode('::', $batchCallback);
|
||||||
|
|
||||||
if(is_callable($batchCallback)) {
|
if(is_callable($batchCallback)) {
|
||||||
$permissionValues = call_user_func($batchCallback, $ids,
|
$permissionValues = call_user_func($batchCallback, $ids,
|
||||||
Member::currentUserID(), false);
|
Member::currentUserID(), false);
|
||||||
|
Loading…
Reference in New Issue
Block a user