phpbb-extensions/autogroups

Fix PHP Notice when encountering users in no group

Closed this issue · 0 comments

In rare cases where a user does not belong to any group, Auto Groups triggers a PHP notice when trying to test if that user belongs to any groups due to the array being null during in_array() at these lines:
https://github.com/phpbb-extensions/autogroups/blob/master/conditions/type/base.php#L187
https://github.com/phpbb-extensions/autogroups/blob/master/conditions/type/base.php#L193

We should makes sure that $user_groups[$user_id] is always an array.