Fixed warnings.

This commit is contained in:
Junichi Satoh 2016-12-07 17:29:04 +09:00
parent 2ca7276443
commit 6edc5e1439
1 changed files with 5 additions and 1 deletions

View File

@ -28,8 +28,12 @@ function mysql_connect_db($host = null, $db = null, $user = null, $pass = null,
if ($port === null)
$port = $config["dbport"];
if ($config["mysqli"] === null && extension_loaded(mysqli))
if ($config["mysqli"] === null && extension_loaded(mysqli)) {
$config["mysqli"] = true;
}
else {
$config["mysqli"] = false;
}
// Non-persistent connection: This will help to avoid mysql errors like "has gone away" or locking problems
// If you want persistent connections change it to mysql_pconnect().