diff --git a/extensions/mentions/src/Listener/AddFilterByMentions.php b/extensions/mentions/src/Listener/AddFilterByMentions.php index 9bf2ea5a2..e25106d20 100755 --- a/extensions/mentions/src/Listener/AddFilterByMentions.php +++ b/extensions/mentions/src/Listener/AddFilterByMentions.php @@ -10,12 +10,13 @@ namespace Flarum\Mentions\Listener; use Flarum\Event\ConfigurePostsQuery; +use Illuminate\Support\Arr; class AddFilterByMentions { public function handle(ConfigurePostsQuery $event) { - if ($mentionedId = array_get($event->filter, 'mentioned')) { + if ($mentionedId = Arr::get($event->filter, 'mentioned')) { $event->query->join('post_mentions_user', 'posts.id', '=', 'post_mentions_user.post_id') ->where('post_mentions_user.mentions_user_id', '=', $mentionedId); }