Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
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
......@@ -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']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment