Fixed error message during user group creation
authorMarcel Werk <burntime@woltlab.com>
Mon, 9 Feb 2015 23:57:59 +0000 (00:57 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 9 Feb 2015 23:57:59 +0000 (00:57 +0100)
wcfsetup/install/files/lib/system/option/user/group/UserGroupOptionHandler.class.php

index e728106868c8829b144ff8150f252c5d9515bf3a..b27cf23f57b3dcfa6ba59f7dd8213b24373c6e60 100644 (file)
@@ -130,7 +130,7 @@ class UserGroupOptionHandler extends OptionHandler {
                                throw new UserInputException($option->optionName, 'exceedsOwnPermission');
                        }
                }
-               else if ($option->optionName == 'admin.user.accessibleGroups' && $this->group->isAdminGroup()) {
+               else if ($option->optionName == 'admin.user.accessibleGroups' && $this->group !== null && $this->group->isAdminGroup()) {
                        $hasOtherAdminGroup = false;
                        foreach (UserGroup::getGroupsByType() as $userGroup) {
                                if ($userGroup->groupID != $this->group->groupID && $userGroup->isAdminGroup()) {