1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-23 04:36:15 +02:00

[ticket/9867] Adjust the implementation of error messages localization.

Use array_map instead of preg_replace.

PHPBB3-9867
This commit is contained in:
rxu
2010-10-26 01:38:09 +08:00
parent ecd648c996
commit 67b243cfc5
4 changed files with 12 additions and 12 deletions

View File

@@ -220,7 +220,7 @@ class ucp_register
}
// Replace "error" strings with their real, localised form
$error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error);
$error = array_map(array($user, 'lang'), $error);
if ($config['enable_confirm'])
{