MDL-6122 truncate_userinfo() has to use unicode aware functions

This commit is contained in:
Petr Skoda
2010-10-06 19:12:49 +00:00
parent 4756e9c9e2
commit e7521e4c13
+2 -1
View File
@@ -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]));
}
}