Permalink
Browse files

BUGFIX avoid call to non-object (from r101794)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@112038 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent ca5c232 commit 1a12f9838249bdbfe509e65b28651a007d4292a6 @sminnee sminnee committed Oct 13, 2010
Showing with 2 additions and 4 deletions.
  1. +2 −4 security/Member.php
View
@@ -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()).

0 comments on commit 1a12f98

Please sign in to comment.