Skip to content
Snippets Groups Projects
Commit a989f6cd authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

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

parent a069d064
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -78,6 +78,9 @@ function db_connect($url) { ...@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment