mirror of
https://github.com/flarum/framework.git
synced 2025-01-19 18:12:59 +08:00
Fix last_post_number potentially being null
This commit is contained in:
parent
7b06d38341
commit
569b9ab27e
|
@ -88,10 +88,10 @@ class DiscussionTableSeeder extends Seeder
|
|||
]);
|
||||
|
||||
$posts[] = $post;
|
||||
}
|
||||
|
||||
if (! $lastPost or $post->time >= $lastPost->time) {
|
||||
$lastPost = $post;
|
||||
if (! $lastPost or $post->time >= $lastPost->time) {
|
||||
$lastPost = $post;
|
||||
}
|
||||
}
|
||||
|
||||
if (rand(1, 20) == 1) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user