mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 20:53:53 +01:00
MDL-28936 fix invalid >200 comparison and utf-8 incompatibility
Credit for discovery goes to Jason Ilicic.
This commit is contained in:
parent
4f3632441a
commit
0b92cdce1f
@ -9368,9 +9368,10 @@ WHERE m.useridto = :userid AND p.name='popup'";
|
||||
$smallmessage = null;
|
||||
if (!empty($message_users->smallmessage)) {
|
||||
//display the first 200 chars of the message in the popup
|
||||
$textlib = textlib_get_instance();
|
||||
$smallmessage = null;
|
||||
if (strlen($message_users->smallmessage>200)) {
|
||||
$smallmessage = substr($message_users->smallmessage,0,200).'...';
|
||||
if ($textlib->strlen($message_users->smallmessage) > 200) {
|
||||
$smallmessage = $textlib->substr($message_users->smallmessage,0,200).'...';
|
||||
} else {
|
||||
$smallmessage = $message_users->smallmessage;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user