From 1cbf27e0f47c3547914b03193d0f5f77c87ff8d5 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Tue, 29 May 2018 14:16:10 +1200 Subject: [PATCH] FIX PHP 5.3 compat for referencing $this in closure, and make method public for same reason sdf --- security/Member.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/security/Member.php b/security/Member.php index cd1d22518..ea06793df 100644 --- a/security/Member.php +++ b/security/Member.php @@ -1052,7 +1052,7 @@ class Member extends DataObject implements TemplateGlobalProvider { * * @return int[] List of group IDs */ - protected function disallowedGroups() { + public function disallowedGroups() { // unless the current user is an admin already OR the logged in user is an admin if (Permission::check('ADMIN') || Permission::checkMember($this, 'ADMIN')) { return array(); @@ -1476,7 +1476,7 @@ class Member extends DataObject implements TemplateGlobalProvider { if(Permission::check('EDIT_PERMISSIONS')) { // Filter allowed groups $groups = Group::get(); - $disallowedGroupIDs = $this->disallowedGroups(); + $disallowedGroupIDs = $self->disallowedGroups(); if ($disallowedGroupIDs) { $groups = $groups->exclude('ID', $disallowedGroupIDs); }