(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:
Patrick Cronin
2019-09-29 21:12:04 -04:00
committed by Pierrick Le Gall
parent 1e7c092770
commit 8f5cac9266
+1 -1
View File
@@ -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())