Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-28936 fix invalid >200 comparison and utf-8 incompatibility

Credit for discovery goes to Jason Ilicic.
  • Loading branch information...
commit a32da065aedc077f27089f9f96f790e51b162672 1 parent 24654d9
@skodak skodak authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/moodlelib.php
View
5 lib/moodlelib.php
@@ -9325,9 +9325,10 @@ function message_popup_window() {
$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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.