1
0
mirror of https://github.com/flarum/core.git synced 2025-07-25 18:51:40 +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 7b06d38341
commit 569b9ab27e

View File

@@ -88,11 +88,11 @@ class DiscussionTableSeeder extends Seeder
]);
$posts[] = $post;
}
if (! $lastPost or $post->time >= $lastPost->time) {
$lastPost = $post;
}
}
if (rand(1, 20) == 1) {
$numberOffset += rand(0, 3);