1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-02 13:47:55 +02:00

[ticket/10198] range validation for strings should limit characters not bytes

PHPBB3-10198
This commit is contained in:
Nils Adermann 2011-06-10 01:07:41 +02:00
parent eb0ffd3503
commit 72479e13ab

View File

@ -600,7 +600,7 @@ function validate_range($value_ary, &$error)
{
case 'string' :
$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
if (strlen($value['value']) > $max)
if (utf8_strlen($value['value']) > $max)
{
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
}