Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
simPod committed Aug 17, 2021
1 parent b601313 commit 39c25c5
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/Doctrine/DBAL/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -1667,9 +1667,6 @@ public function transactional(Closure $func)
$this->beginTransaction();
try {
$res = $func($this);
$this->commit();

return $res;
} catch (Throwable $e) {
$this->rollBack();

Expand Down Expand Up @@ -1791,7 +1788,7 @@ public function commit()
} catch (Throwable $ex) {
$this->updateTransactionStateAfterCommit();

throw DBALException::driverExceptionDuringQuery($this->_driver, $ex, 'COMMIT');
$this->handleExceptionDuringQuery($ex, 'COMMIT');
}

if ($logger) {
Expand All @@ -1809,19 +1806,19 @@ public function commit()
}

$this->updateTransactionStateAfterCommit();

return $result;
}

private function updateTransactionStateAfterCommit() : void
private function updateTransactionStateAfterCommit(): void
{
--$this->transactionNestingLevel;

if ($this->autoCommit !== false || $this->transactionNestingLevel !== 0) {
return $result;
return;
}

$this->beginTransaction();

return $result;
}

/**
Expand Down

0 comments on commit 39c25c5

Please sign in to comment.