function DatabaseConnection_mysql::doCommit
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 583
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;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.