Commit ff4fd984 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#194494 by Jax, slightly expanded: unify empty password handling is MySQL and...

#194494 by Jax, slightly expanded: unify empty password handling is MySQL and MySQLi installer and runtime drivers
parent 97a97554
......@@ -59,12 +59,7 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
$url['user'] = urldecode($url['user']);
// Test if database url has a password.
if (isset($url['pass'])) {
$url['pass'] = urldecode($url['pass']);
}
else {
$url['pass'] = '';
}
$url['pass'] = isset($url['pass']) ? urldecode($url['pass']) : '';
$url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']);
......
......@@ -65,12 +65,7 @@ function db_connect($url) {
// Decode url-encoded information in the db connection string
$url['user'] = urldecode($url['user']);
// Test if database url has a password.
if (isset($url['pass'])) {
$url['pass'] = urldecode($url['pass']);
}
else {
$url['pass'] = '';
}
$url['pass'] = isset($url['pass']) ? urldecode($url['pass']) : '';
$url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']);
if (!isset($url['port'])) {
......
......@@ -29,7 +29,7 @@ function drupal_test_mysql($url, &$success) {
// Decode url-encoded information in the db connection string.
$url['user'] = urldecode($url['user']);
$url['pass'] = urldecode($url['pass']);
$url['pass'] = isset($url['pass']) ? urldecode($url['pass']) : '';
$url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']);
......
......@@ -29,7 +29,7 @@ function drupal_test_mysqli($url, &$success) {
// Decode url-encoded information in the db connection string.
$url['user'] = urldecode($url['user']);
$url['pass'] = isset($url['pass']) ? urldecode($url['pass']) : NULL;
$url['pass'] = isset($url['pass']) ? urldecode($url['pass']) : '';
$url['host'] = urldecode($url['host']);
$url['path'] = urldecode($url['path']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment