Skip to content
Snippets Groups Projects
Commit d6f9e2c4 authored by catch's avatar catch
Browse files

Issue #3126940 by Beakerboy, daffie: New DB URI breaks if an existing query...

Issue #3126940 by Beakerboy, daffie: New DB URI breaks if an existing query part is missing the new module parameter
parent cf0b3f43
No related branches found
No related tags found
8 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!144Issue #2666286: Clean up menu_ui to conform to Drupal coding standards,!16Draft: Resolve #2081585 "History storage",!13Resolve #2903456
......@@ -468,7 +468,7 @@ public static function convertDbUrlToConnectionInfo($url, $root) {
$url_components = parse_url($url);
if (isset($url_components['query'])) {
parse_str($url_components['query'], $query);
if ($query['module']) {
if (isset($query['module']) && $query['module']) {
$module = $query['module'];
// Set up an additional autoloader. We don't use the main autoloader as
// this method can be called before Drupal is installed and is never
......
......@@ -188,6 +188,19 @@ public function providerConvertDbUrlToConnectionInfo() {
'autoload' => 'core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/',
],
],
'MySql with a custom query parameter' => [
'',
'mysql://test_user:test_pass@test_host:3306/test_database?extra=value',
[
'driver' => 'mysql',
'username' => 'test_user',
'password' => 'test_pass',
'host' => 'test_host',
'database' => 'test_database',
'port' => 3306,
'namespace' => 'Drupal\Core\Database\Driver\mysql',
],
],
];
}
......
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