1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 03:34:04 +02:00

[feature/avatars] Implement better treatment of avatar errors

PHPBB3-10018
This commit is contained in:
Marc Alexander
2012-11-25 17:01:21 +01:00
parent f8256ed00f
commit a77fcdb5f9
4 changed files with 21 additions and 25 deletions

View File

@@ -656,18 +656,16 @@ class ucp_profile
}
// Replace "error" strings with their real, localised form
$err = $error;
$error = array();
foreach ($err as $e)
foreach ($error as $key => $lang)
{
if (is_array($e))
if (is_array($lang))
{
$key = array_shift($e);
$error[] = vsprintf($user->lang($key), $e);
$key = array_shift($lang);
$error[$key] = vsprintf($user->lang($key), $lang);
}
else
{
$error[] = $user->lang((string) $e);
$error[$key] = $user->lang("$lang");
}
}