1
0
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:
Marc Alexander 2014-06-03 00:31:17 +02:00
parent 8ba083f886
commit 2d47f85801

View File

@ -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)
{