1
0
mirror of https://github.com/flarum/core.git synced 2025-01-18 06:38:25 +01: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,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) {