Skip to content

Commit 00b6877

Browse files
committed
Defensive check
1 parent 6207355 commit 00b6877

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Database/Adapter/SQL.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ public function commitTransaction(): bool
9090
return false;
9191
}
9292

93+
if (!$this->getPDO()->inTransaction()) {
94+
$this->inTransaction = 0;
95+
return false;
96+
}
97+
9398
if ($this->inTransaction > 1) {
9499
$this->inTransaction--;
95100
return true;

0 commit comments

Comments
 (0)