1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-05 21:58:10 +02:00

MySqliDriver: coalesced password to an empty string (#360)

mysqli::real_connect() expects parameter 3 to be string, yields an error on NULL.
This commit is contained in:
Adam Klvač
2020-03-26 03:21:59 +01:00
committed by David Grudl
parent 6eac117f5f
commit e826e3a719

View File

@@ -91,7 +91,7 @@ class MySqliDriver implements Dibi\Driver
@$this->connection->real_connect( // intentionally @ @$this->connection->real_connect( // intentionally @
(empty($config['persistent']) ? '' : 'p:') . $config['host'], (empty($config['persistent']) ? '' : 'p:') . $config['host'],
$config['username'], $config['username'],
$config['password'], $config['password'] ?? '',
$config['database'] ?? '', $config['database'] ?? '',
$config['port'] ?? 0, $config['port'] ?? 0,
$config['socket'], $config['socket'],