Skip to content

Commit

Permalink
Fix InvalidArgument issue in MySQL connection error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Feb 15, 2021
1 parent 715a391 commit 26c7adc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Doctrine/DBAL/Driver/Mysqli/MysqliConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ public function __construct(array $params, $username, $password, array $driverOp
$this->setSecureConnection($params);
$this->setDriverOptions($driverOptions);

set_error_handler(static function () {
set_error_handler(static function (): bool {
return false;
});
try {
if (! $this->conn->real_connect($params['host'], $username, $password, $dbname, $port, $socket, $flags)) {
Expand Down

0 comments on commit 26c7adc

Please sign in to comment.