🇷🇺Russia ru.bsv Omsk
Other error message for the same problem:
PHP Fatal error: Uncaught TypeError: Drupal\Core\Database\Connection::getClientConnection(): Return value must be of type object, null returned in /.../web/core/lib/Drupal/Core/Database/Connection.php:306 Stack trace:
#0 /.../web/core/modules/mysql/src/Driver/Database/mysql/TransactionManager.php(31): Drupal\Core\Database\Connection->getClientConnection()
#1 /.../web/core/lib/Drupal/Core/Database/Transaction/TransactionManagerBase.php(278): Drupal\mysql\Driver\Database\mysql\TransactionManager->processRootCommit()
#2 /.../web/core/lib/Drupal/Core/Database/Transaction.php(88): Drupal\Core\Database\Transaction\TransactionManagerBase->unpile()
#3 [internal function]: Drupal\Core\Database\Transaction->__destruct()
#4 {main}
thrown in /.../web/core/lib/Drupal/Core/Database/Connection.php on line 306
I'm using:
- Drupal version: 10.2.0
- PHP version: 8.1.27
- Drush version: 12.4.3.0
I fixed the problem with (the temporary way).
1. Check whether the Xdebug is installed:
php -m | grep Xdebug
2. Disabled Xdebug:
sudo mv /etc/php/8.1/mods-available/xdebug.ini /etc/php/8.1/mods-available/xdebug.ini.bak
sudo systemctl restart nginx php8.1-fpm
check whether the Xdebug is not installed:
php -m | grep Xdebug
drush updatedb -y
Successfully!