#193891 by mvc: fix NOTICE in database.mysqli.inc because of possibly missing port number

6.x
Gábor Hojtsy 2007-11-26 08:21:49 +00:00
parent a069d06465
commit a989f6cd50
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ function db_connect($url) {
} }
$url['host'] = urldecode($url['host']); $url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']); $url['path'] = urldecode($url['path']);
if (!isset($url['port'])) {
$url['port'] = NULL;
}
$connection = mysqli_init(); $connection = mysqli_init();
@mysqli_real_connect($connection, $url['host'], $url['user'], $url['pass'], substr($url['path'], 1), $url['port'], NULL, MYSQLI_CLIENT_FOUND_ROWS); @mysqli_real_connect($connection, $url['host'], $url['user'], $url['pass'], substr($url['path'], 1), $url['port'], NULL, MYSQLI_CLIENT_FOUND_ROWS);