diff --git a/system/src/Grav/Common/Flex/Types/UserGroups/UserGroupObject.php b/system/src/Grav/Common/Flex/Types/UserGroups/UserGroupObject.php index b3d7b237f5..8ecee2f1a7 100644 --- a/system/src/Grav/Common/Flex/Types/UserGroups/UserGroupObject.php +++ b/system/src/Grav/Common/Flex/Types/UserGroups/UserGroupObject.php @@ -78,7 +78,7 @@ public function authorize(string $action, string $scope = null): ?bool public static function groupNames(): array { $groups = []; - $user_groups = Grav::instance()['user_groups']; + $user_groups = Grav::instance()['user_groups'] ?? []; foreach ($user_groups as $key => $group) { $groups[$key] = $group->readableName;