Skip to content

Commit

Permalink
MDL-6122 truncate_userinfo() has to use unicode aware functions
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Oct 6, 2010
1 parent 78da89d commit 03c5a27
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/moodlelib.php
Expand Up @@ -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]));
}
}

Expand Down

0 comments on commit 03c5a27

Please sign in to comment.