-
Bug
-
Resolution: Fixed
-
Major
-
2.8.7
-
MySQL
-
MOODLE_28_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-50880-master -
The text in old messages are not shown in a Moodle upgraded to 2.8+ version (upgraded in the next order: 1.9 -> 2.0 -->2.1 --> 2.2 --> 2.6-> 2.8). The new messages are shown normally and the date field on old messages are shown.
The problem is the operator "!==" used to validate the empty values in function message_format_message_text. In some cases, the value is null and the condition is not satisfied.
In order to correct the error, in file "message/lib.php", function message_format_message_text, change the conditions:
if ($message->smallmessage !== '')
by
if (!empty($message->smallmessage))
and:
_if ($message->fullmessagehtml !== '') _
by
_if (!empty($message->fullmessagehtml)) _