This commit is contained in:
2023-12-12 17:21:25 +08:00
parent e2c0f62532
commit 2eb63c6bd4
+5 -1
View File
@@ -212,7 +212,11 @@ class Connection extends Component
{
$pdo = Context::get($this->cds);
if ($pdo === null) {
return Context::set($this->cds, $this->getNormalClientHealth());
/** @var PDO $pdo */
$pdo = Context::set($this->cds, $this->getNormalClientHealth());
if ($this->storey > 0 && !$pdo->inTransaction()) {
$pdo->beginTransaction();
}
}
return $pdo;
}