diff --git a/core/lib/Drupal/Core/Database/Database.php b/core/lib/Drupal/Core/Database/Database.php index 8d638f2..12a78c9 100755 --- a/core/lib/Drupal/Core/Database/Database.php +++ b/core/lib/Drupal/Core/Database/Database.php @@ -365,8 +365,7 @@ throw new DriverNotSpecifiedException('Driver not specified for this database connection: ' . $key); } - $namespace = $info['namespace']; - $driver_class = $namespace . '\\Connection'; + $driver_class = self::$databaseInfo[$key][$target]['namespace'] . '\\Connnection'; $pdo_connection = $driver_class::open(self::$databaseInfo[$key][$target]); $new_connection = new $driver_class($pdo_connection, self::$databaseInfo[$key][$target]); @@ -489,7 +488,7 @@ public static function getConnectionInfoAsUrl($key = 'default') { throw new \RuntimeException("Database connection $key not defined or missing the 'default' settings"); } - $connection_class = $info['namespace']; + $connection_class = $db_info['default']['namespace'] . '\\Connection'; return $connection_class::createUrlFromConnectionOptions($db_info['default']); }