1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-03 15:27:42 +02:00

[ticket/16549] Fix database testcase transactions handling, fix indentations

PHPBB3-16549
This commit is contained in:
rxu
2020-11-14 23:20:39 +07:00
parent ba9fd7f5df
commit 72a39920c7
3 changed files with 13 additions and 9 deletions

View File

@@ -393,12 +393,16 @@ class phpbb_database_test_connection_manager
{
$this->pdo->beginTransaction();
}
else if ($query === 'commit')
else if ($query === 'commit' && $this->pdo->inTransaction())
{
$this->pdo->commit();
}
else
{
if (!$this->pdo->inTransaction())
{
$this->pdo->beginTransaction();
}
$this->pdo->exec($query);
}
}