diff --git a/phpBB/includes/acp/acp_groups.php b/phpBB/includes/acp/acp_groups.php index a55087adce..19006df306 100644 --- a/phpBB/includes/acp/acp_groups.php +++ b/phpBB/includes/acp/acp_groups.php @@ -559,16 +559,16 @@ class acp_groups * Merge any avatar errors into the primary error array * Drivers use language constants, so we need to map to the actual strings */ - foreach ($avatar_error as $e) + foreach ($avatar_error as $lang) { - if (is_array($e)) + if (is_array($lang)) { - $key = array_shift($e); - $error[] = vsprintf($user->lang($key), $e); + $key = array_shift($lang); + $error[] = vsprintf($user->lang($key), $lang); } else { - $error[] = $user->lang("$e"); + $error[] = $user->lang("$lang"); } } diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 823f001fe0..e0dcea6d58 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1836,21 +1836,19 @@ class acp_users } // 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); + $lang_key = array_shift($lang); + $error[$key] = vsprintf($user->lang($lang_key), $lang); } else { - $error[] = $user->lang((string) $e); + $error[$key] = $user->lang("$lang"); } } - + $avatar = get_user_avatar($user_row, 'USER_AVATAR', true); $template->assign_vars(array( diff --git a/phpBB/includes/ucp/ucp_groups.php b/phpBB/includes/ucp/ucp_groups.php index dd03f332ff..3860d22917 100644 --- a/phpBB/includes/ucp/ucp_groups.php +++ b/phpBB/includes/ucp/ucp_groups.php @@ -679,16 +679,16 @@ class ucp_groups // Merge any avatars errors into the primary error array // Drivers use lang constants, so we need to map to the actual strings - foreach ($avatar_error as $e) + foreach ($avatar_error as $lang) { - if (is_array($e)) + if (is_array($lang)) { - $key = array_shift($e); - $error[] = vsprintf($user->lang($key), $e); + $key = array_shift($lang); + $error[] = vsprintf($user->lang($key), $lang); } else { - $error[] = $user->lang((string) $e); + $error[] = $user->lang("$lang"); } } diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 88820beac1..c05105eaff 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -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"); } }