From ab6e899c7e3151f693d7ccf2d559c8b2c933629d Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sat, 3 Sep 2016 22:30:22 +0930 Subject: [PATCH] Fix fatal error when viewing a discussion with multiple pages of posts --- .../mentions/src/Listener/AddPostMentionedByRelationship.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/extensions/mentions/src/Listener/AddPostMentionedByRelationship.php b/extensions/mentions/src/Listener/AddPostMentionedByRelationship.php index 2417c3857..c408e3f0e 100755 --- a/extensions/mentions/src/Listener/AddPostMentionedByRelationship.php +++ b/extensions/mentions/src/Listener/AddPostMentionedByRelationship.php @@ -142,6 +142,10 @@ class AddPostMentionedByRelationship } if (isset($posts)) { + $posts = array_filter($posts, function ($post) { + return is_object($post); + }); + $ids = []; // Once we have the posts, construct a list of the IDs of all of