diff --git a/core/lib/Drupal/Core/Database/Connection.php b/core/lib/Drupal/Core/Database/Connection.php index c155dee..803689b 100644 --- a/core/lib/Drupal/Core/Database/Connection.php +++ b/core/lib/Drupal/Core/Database/Connection.php @@ -285,14 +285,6 @@ public function getConnectionOptions() { } /** - * Returns the namespace of this Connection object. - * - * @return string - * The namespace of this connection object. - */ - abstract public function getNamespace(); - - /** * Set the list of prefixes used by this database connection. * * @param array|string $prefix diff --git a/core/lib/Drupal/Core/Database/Log.php b/core/lib/Drupal/Core/Database/Log.php index aad111e..c1fb8b5 100644 --- a/core/lib/Drupal/Core/Database/Log.php +++ b/core/lib/Drupal/Core/Database/Log.php @@ -185,7 +185,8 @@ public function findCaller() { * Namespace of the database connection. */ protected function getConnectionNamespace() { - return Database::getConnection($this->connectionKey)->getNamespace(); + $connection_class = get_class(Database::getConnection($this->connectionKey)); + return substr($class, 0, strrpos($connection_class, '\\')); } /**