mirror of
https://github.com/flarum/core.git
synced 2025-08-03 06:57:54 +02:00
fix: mentions posts is not an array but collection
This commit is contained in:
@@ -48,7 +48,7 @@ class LoadMentionedByRelationship
|
||||
|
||||
if ($data instanceof Discussion) {
|
||||
// @phpstan-ignore-next-line
|
||||
$loadable = $data->newCollection($data->posts)->filter(function ($post) {
|
||||
$loadable = $data->newCollection((array) $data->posts)->filter(function ($post) {
|
||||
return $post instanceof Post;
|
||||
});
|
||||
} elseif ($data instanceof Collection) {
|
||||
|
Reference in New Issue
Block a user