mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02: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:
@@ -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)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user