diff --git a/lib/Doctrine/DBAL/DriverManager.php b/lib/Doctrine/DBAL/DriverManager.php index 22ae8ac3264..3ea36c18033 100644 --- a/lib/Doctrine/DBAL/DriverManager.php +++ b/lib/Doctrine/DBAL/DriverManager.php @@ -153,7 +153,17 @@ public static function getConnection( $eventManager = new EventManager(); } - $params = self::parseDatabaseUrl($params); + if (isset($params['master'])) { + $params['master'] = self::parseDatabaseUrl($params['master']); + + if (isset($params['slaves'])) { + foreach ($params['slaves'] as $slaveName => $slaveParams) { + $params['slaves'][$slaveName] = self::parseDatabaseUrl($slaveParams); + } + } + } else { + $params = self::parseDatabaseUrl($params); + } // check for existing pdo object if (isset($params['pdo']) && ! $params['pdo'] instanceof \PDO) {