mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[ticket/12457] Default to first category if none is selected in gallery avatar
If any category exists, the key() function should always return the first key of the $avatar_list array. PHPBB3-12457
This commit is contained in:
parent
8ba083f886
commit
2d47f85801
@ -36,7 +36,7 @@ class local extends \phpbb\avatar\driver\driver
|
||||
public function prepare_form($request, $template, $user, $row, &$error)
|
||||
{
|
||||
$avatar_list = $this->get_avatar_list($user);
|
||||
$category = $request->variable('avatar_local_cat', '');
|
||||
$category = $request->variable('avatar_local_cat', key($avatar_list));
|
||||
|
||||
foreach ($avatar_list as $cat => $null)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user