Permalink
Browse files

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

  • Loading branch information...
1 parent 78da89d commit 03c5a27bf40a85888238c982461d528143f78a51 @skodak skodak committed Oct 6, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/moodlelib.php
View
@@ -3055,9 +3055,10 @@ function truncate_userinfo($info) {
);
// apply where needed
+ $textlib = textlib_get_instance();
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]));
}
}

0 comments on commit 03c5a27

Please sign in to comment.