Skip to content

Commit 7351e5f

Browse files
authored
Merge pull request #2928 from cristianbuj/fix-roles-index-gap
prevent returning a gap in roles index
2 parents 5d21457 + cb74810 commit 7351e5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Model/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public function getRoles()
285285
// we need to make sure to have at least one role
286286
$roles[] = static::ROLE_DEFAULT;
287287

288-
return array_unique($roles);
288+
return array_values(array_unique($roles));
289289
}
290290

291291
/**

0 commit comments

Comments
 (0)