1
0
mirror of https://github.com/flarum/core.git synced 2025-08-13 20:04:24 +02:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Daniël Klabbers
dff35c1046 fix: mentions posts is not an array but collection 2023-05-15 12:20:02 +02:00

View File

@@ -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) {