Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2390,8 +2390,8 @@ public function boardsAllowedTo(string|array $permissions, bool $check_access =
// Maybe a mod needs to tweak the list of allowed boards on the fly?
IntegrationHook::call('integrate_boards_allowed_to', [&$boards, $deny_boards, $permissions, $check_access, $simple]);

// Ensure each permission's array is a simple list.
$boards = array_map(fn($board_list) => array_values((array) $board_list), $boards);
// Ensure there are no gaps in the keys.
$boards = $simple ? array_values($boards) : array_map(fn($board_list) => array_values($board_list), $boards);

return $boards;
}
Expand Down
Loading