mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
preparing to use egroupware with mbstring.func_overload=0 by using mb_(strlen|substr) where necessary and providing an implementation for mb_*, if mbstring is not available
This commit is contained in:
parent
6fb70805cb
commit
85cd466eda
@ -2318,9 +2318,9 @@ class etemplate_old extends boetemplate
|
||||
{
|
||||
self::set_validation_error($form_name,lang('Field must not be empty !!!'),'');
|
||||
}
|
||||
if ((int) $attr['maxlength'] > 0 && strlen($value) > (int) $attr['maxlength'])
|
||||
if ((int) $attr['maxlength'] > 0 && mb_strlen($value) > (int) $attr['maxlength'])
|
||||
{
|
||||
$value = substr($value,0,(int) $attr['maxlength']);
|
||||
$value = mb_substr($value,0,(int) $attr['maxlength']);
|
||||
}
|
||||
if ($attr['preg'] && !preg_match($attr['preg'],$value))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user