MDL-6122 truncate_userinfo() has to use unicode aware functions
This commit is contained in:
+2
-1
@@ -3496,10 +3496,11 @@ function truncate_userinfo($info) {
|
||||
'url' => 255,
|
||||
);
|
||||
|
||||
$textlib = textlib_get_instance();
|
||||
// apply where needed
|
||||
foreach (array_keys($info) as $key) {
|
||||
if (!empty($limit[$key])) {
|
||||
$info[$key] = trim(substr($info[$key],0, $limit[$key]));
|
||||
$info[$key] = trim($textlib->substr($info[$key],0, $limit[$key]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user