diff options
author | Andreas Fischer <bantu@phpbb.com> | 2011-06-10 01:24:16 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2011-06-10 01:24:16 +0200 |
commit | df52801989655a2c35af971c8e82e60be5d3eeb4 (patch) | |
tree | 02379f385682448b6161f2eaca081adffd8937f1 /phpBB/includes/functions_acp.php | |
parent | ca1944ebe2ca5a5641f9a3656382abeb5d6bae56 (diff) | |
parent | a4f7002995440e2d1f1bf51878d581fa91d15623 (diff) | |
download | forums-df52801989655a2c35af971c8e82e60be5d3eeb4.tar forums-df52801989655a2c35af971c8e82e60be5d3eeb4.tar.gz forums-df52801989655a2c35af971c8e82e60be5d3eeb4.tar.bz2 forums-df52801989655a2c35af971c8e82e60be5d3eeb4.tar.xz forums-df52801989655a2c35af971c8e82e60be5d3eeb4.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[ticket/10198] range validation for strings should limit characters not bytes
[ticket/10198] validate_config_vars() improperly validates multibyte strings
Conflicts:
phpBB/adm/index.php
Diffstat (limited to 'phpBB/includes/functions_acp.php')
-rw-r--r-- | phpBB/includes/functions_acp.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_acp.php b/phpBB/includes/functions_acp.php index 52c9b9147f..c3806dc786 100644 --- a/phpBB/includes/functions_acp.php +++ b/phpBB/includes/functions_acp.php @@ -329,7 +329,7 @@ function validate_config_vars($config_vars, &$cfg_array, &$error) switch ($validator[$type]) { case 'string': - $length = strlen($cfg_array[$config_name]); + $length = utf8_strlen($cfg_array[$config_name]); // the column is a VARCHAR $validator[$max] = (isset($validator[$max])) ? min(255, $validator[$max]) : 255; @@ -527,7 +527,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); } |