Fix PDO exception when committing an autocommitted transaction in PHP 8
This commit is contained in:
parent
b7880fc760
commit
9c01267f4a
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ if (null !== $page->onlinePos) {
|
|||
|
||||
$tpl = $c->View->rendering($page);
|
||||
|
||||
if ($c->isInit('DB')) {
|
||||
if (
|
||||
$c->isInit('DB')
|
||||
&& $c->DB->inTransaction()
|
||||
) {
|
||||
$c->DB->commit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue