mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX avoid call to non-object
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@101794 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9bb41119e7
commit
444d6d3137
@ -121,13 +121,11 @@ class Member extends DataObject {
|
||||
|
||||
// Find or create ADMIN group
|
||||
$adminGroups = Permission::get_groups_by_permission('ADMIN');
|
||||
if($adminGroups) {
|
||||
if(!$adminGroups) {
|
||||
singleton('Group')->requireDefaultRecords();
|
||||
$adminGroups = Permission::get_groups_by_permission('ADMIN');
|
||||
$adminGroup = $adminGroups->First();
|
||||
} else {
|
||||
$adminGroup = $adminGroups->First();
|
||||
}
|
||||
$adminGroup = $adminGroups->First();
|
||||
|
||||
// Add a default administrator to the first ADMIN group found (most likely the default
|
||||
// group created through Group->requireDefaultRecords()).
|
||||
|
Loading…
Reference in New Issue
Block a user