Skip to content

Commit 7681795

Browse files
committed
dont decrement below 0
1 parent 219f406 commit 7681795

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Illuminate/Database/Concerns/ManagesTransactions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public function commit()
186186
*/
187187
protected function handleCommitTransactionException($e, $currentAttempt, $maxAttempts)
188188
{
189-
$this->transactions--;
189+
$this->transactions = max(0, $this->transactions - 1);
190190

191191
if ($this->causedByConcurrencyError($e) &&
192192
$currentAttempt < $maxAttempts) {

0 commit comments

Comments
 (0)