From 666de7ce40f1205cfb27b330cb7bc0614dcd4251 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Fri, 25 Aug 2023 10:10:09 +0800 Subject: [PATCH] qqq --- Connection.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Connection.php b/Connection.php index feec349..2860fba 100644 --- a/Connection.php +++ b/Connection.php @@ -201,7 +201,10 @@ class Connection extends Component { if ($this->storey == 0) { /** @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()) { $pdo->beginTransaction(); }