protected function DatabaseConnection_mysql::doCommit in Drupal 7
Do the actual commit, including a workaround for PHP 8 behaviour changes.
Return value
bool Success or otherwise of the commit.
1 call to DatabaseConnection_mysql::doCommit()
- DatabaseConnection_mysql::popCommittableTransactions in includes/
database/ mysql/ database.inc - Overridden to work around issues to MySQL not supporting transactional DDL.
File
- includes/
database/ mysql/ database.inc, line 578 - Database interface code for MySQL database servers.
Class
Code
protected function doCommit() {
if ($this->connection
->inTransaction()) {
return $this->connection
->commit();
}
else {
// In PHP 8.0 a PDOException is thrown when a commit is attempted with no
// transaction active. In previous PHP versions this failed silently.
return TRUE;
}
}