mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
mlanthaler: Small fix to prevent E_NOTICEs.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@41814 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
fa43f70696
commit
3d612298a4
@ -97,9 +97,15 @@ class Permission extends DataObject {
|
||||
// Build a list of the IDs of the groups. Most of the heavy lifting is done by Member::Groups
|
||||
// NOTE: This isn't effecient; but it's called once per session so it's a low priority to fix.
|
||||
$groups = $member->Groups();
|
||||
if($groups) foreach($groups as $group) $groupList[] = $group->ID;
|
||||
|
||||
// Session caching
|
||||
$groupList = array();
|
||||
|
||||
if($groups) {
|
||||
foreach($groups as $group)
|
||||
$groupList[] = $group->ID;
|
||||
}
|
||||
|
||||
|
||||
// Session caching
|
||||
if(!$memberID) {
|
||||
$_SESSION['Permission_groupList'][$member->ID] = $groupList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user