Skip to content

Commit

Permalink
Fix recursive group add (#3288)
Browse files Browse the repository at this point in the history
  • Loading branch information
supercrafter100 committed Mar 28, 2023
1 parent ec9f5e4 commit c50e1c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/classes/Core/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private function find(string $value, string $field = 'id'): bool {
* @return bool True on success, false if they already have it.
*/
public function addGroup(int $group_id, int $expire = 0): bool {
if (array_key_exists($group_id, $this->getGroups())) {
if (array_key_exists($group_id, $this->_groups ?? [])) {
return false;
}

Expand Down

0 comments on commit c50e1c3

Please sign in to comment.