This commit is contained in:
2023-09-01 10:53:38 +08:00
parent 0bff75446d
commit 2ee482241d
2 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -282,7 +282,7 @@ class Connection extends Component
if ($pdo === null) {
throw new Exception('Failed to rollback transaction: connection was exists.');
}
if ($pdo->inTransaction()) {
if ($this->inTransaction()) {
$pdo->rollback();
}
$this->release($pdo);
@@ -301,7 +301,7 @@ class Connection extends Component
if ($pdo === null) {
throw new Exception('Failed to commit transaction: connection was exists.');
}
if ($pdo->inTransaction()) {
if ($this->inTransaction()) {
$pdo->commit();
}
$this->release($pdo);