mirror of
https://github.com/flarum/core.git
synced 2025-08-03 23:17:43 +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) {
|
if ($data instanceof Discussion) {
|
||||||
// @phpstan-ignore-next-line
|
// @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;
|
return $post instanceof Post;
|
||||||
});
|
});
|
||||||
} elseif ($data instanceof Collection) {
|
} elseif ($data instanceof Collection) {
|
||||||
|
Reference in New Issue
Block a user