mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
(Fix #359) mysqli docs use empty string for no db name
PHP docs for mysqli's constructor (https://www.php.net/manual/en/mysqli.construct.php) show that the default value for $dbname is an empty string. So, if we want to use parameters after $dbname in the call without specifying a database name, we should be using an empty string instead of a NULL.
This commit is contained in:
committed by
Pierrick Le Gall
parent
1e7c092770
commit
8f5cac9266
@@ -47,7 +47,7 @@ function pwg_db_connect($host, $user, $password, $database)
|
||||
list($host, $port) = explode(':', $host);
|
||||
}
|
||||
|
||||
$dbname = null;
|
||||
$dbname = '';
|
||||
|
||||
$mysqli = new mysqli($host, $user, $password, $dbname, $port, $socket);
|
||||
if (mysqli_connect_error())
|
||||
|
||||
Reference in New Issue
Block a user