MDL-46881 forum: Mark posts as ready properly
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 23 Jan 2019 03:33:17 +0000 (11:33 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 29 Jan 2019 23:48:38 +0000 (07:48 +0800)
mod/forum/classes/task/send_user_notifications.php

index 0b6bd9e..552177a 100644 (file)
@@ -168,7 +168,7 @@ class send_user_notifications extends \core\task\adhoc_task {
             if (get_user_preferences('forum_markasreadonnotification', 1, $this->recipient->id) == 1) {
                 $this->log_start("Marking posts as read");
                 $count = count($markposts);
-                forum_tp_mark_posts_read($this->recipient, $markposts);
+                forum_tp_mark_posts_read($this->recipient, array_keys($markposts));
                 $this->log_finish("Marked {$count} posts as read");
             }
         }