mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-03 14:17:56 +02:00
[ticket/10198] range validation for strings should limit characters not bytes
PHPBB3-10198
This commit is contained in:
parent
eb0ffd3503
commit
72479e13ab
@ -600,7 +600,7 @@ function validate_range($value_ary, &$error)
|
|||||||
{
|
{
|
||||||
case 'string' :
|
case 'string' :
|
||||||
$max = (isset($column[1])) ? min($column[1],$type['max']) : $type['max'];
|
$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);
|
$error[] = sprintf($user->lang['SETTING_TOO_LONG'], $user->lang[$value['lang']], $max);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user