Fix PDO exception when committing an autocommitted transaction in PHP 8

This commit is contained in:
Visman 2021-01-06 20:04:20 +07:00
parent b7880fc760
commit 9c01267f4a

View file

@ -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();
}