MDL-49960 message: Prevent coding error when getting recent convos

This commit is contained in:
Frederic Massart
2015-04-23 12:08:33 +08:00
parent e28767f414
commit d9b5f9bb6c
+1
View File
@@ -777,6 +777,7 @@ function message_get_recent_conversations($user, $limitfrom=0, $limitto=100) {
// Union the 2 result sets together looking for the message with the most
// recent timecreated for each other user.
// $conversation->id (the array key) is the other user's ID.
$conversations = array();
$conversation_arrays = array($unread, $read);
foreach ($conversation_arrays as $conversation_array) {
foreach ($conversation_array as $conversation) {