mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00: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
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class local extends \phpbb\avatar\driver\driver
|
||||||
public function prepare_form($request, $template, $user, $row, &$error)
|
public function prepare_form($request, $template, $user, $row, &$error)
|
||||||
{
|
{
|
||||||
$avatar_list = $this->get_avatar_list($user);
|
$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)
|
foreach ($avatar_list as $cat => $null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue