Skip to content

Commit 87ba26f

Browse files
jeffreyvrRiari
authored andcommitted
Use index for sequence number on DeletePost action (#377)
1 parent 975a1ce commit 87ba26f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Actions/DeletePost.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ protected function transact()
4747
}
4848

4949
// Update sequence numbers for all of the thread's posts
50-
$this->post->thread->posts->each(function ($p) {
51-
$p->updateWithoutTouch(['sequence' => $p->getSequenceNumber()]);
50+
$this->post->thread->posts->each(function ($p, $i) {
51+
$p->updateWithoutTouch(['sequence' => $i + 1]);
5252
});
5353

5454
return $this->post;

0 commit comments

Comments
 (0)