1
0
mirror of https://github.com/flarum/core.git synced 2025-07-31 13:40:20 +02:00

Fix last_post_number potentially being null

This commit is contained in:
Toby Zerner
2015-01-07 17:25:11 +10:30
parent fedfc24f6b
commit a1ef2e08c0

View File

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