This commit is contained in:
2023-08-25 10:10:09 +08:00
parent d377deab8e
commit 666de7ce40
+4 -1
View File
@@ -201,7 +201,10 @@ class Connection extends Component
{ {
if ($this->storey == 0) { if ($this->storey == 0) {
/** @var PDO $pdo */ /** @var PDO $pdo */
$pdo = Context::get($this->cds, $this->getTransactionClient()); $pdo = Context::get($this->cds);
if ($pdo == null) {
$pdo = Context::set($this->cds, $this->getTransactionClient());
}
if (!$pdo->inTransaction()) { if (!$pdo->inTransaction()) {
$pdo->beginTransaction(); $pdo->beginTransaction();
} }