mirror of
https://github.com/flarum/core.git
synced 2025-07-26 03:01:22 +02:00
Fix last_post_number potentially being null
This commit is contained in:
@@ -88,11 +88,11 @@ class DiscussionTableSeeder extends Seeder
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
$posts[] = $post;
|
$posts[] = $post;
|
||||||
}
|
|
||||||
|
|
||||||
if (! $lastPost or $post->time >= $lastPost->time) {
|
if (! $lastPost or $post->time >= $lastPost->time) {
|
||||||
$lastPost = $post;
|
$lastPost = $post;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (rand(1, 20) == 1) {
|
if (rand(1, 20) == 1) {
|
||||||
$numberOffset += rand(0, 3);
|
$numberOffset += rand(0, 3);
|
||||||
|
Reference in New Issue
Block a user