We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b8057c commit 4b5ef9eCopy full SHA for 4b5ef9e
src/Illuminate/Database/Concerns/ManagesTransactions.php
@@ -290,7 +290,11 @@ public function rollBack($toLevel = null)
290
protected function performRollBack($toLevel)
291
{
292
if ($toLevel == 0) {
293
- $this->getPdo()->rollBack();
+ $pdo = $this->getPdo();
294
+
295
+ if ($pdo->inTransaction()) {
296
+ $pdo->rollBack();
297
+ }
298
} elseif ($this->queryGrammar->supportsSavepoints()) {
299
$this->getPdo()->exec(
300
$this->queryGrammar->compileSavepointRollBack('trans'.($toLevel + 1))
0 commit comments