Skip to content

Commit

Permalink
BUGFIX avoid call to non-object (from r101794)
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112038 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information
Sam Minnee committed Oct 13, 2010
1 parent ca5c232 commit 1a12f98
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions security/Member.php
Expand Up @@ -121,13 +121,11 @@ function requireDefaultRecords() {

// 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()).
Expand Down

0 comments on commit 1a12f98

Please sign in to comment.