Skip to content

Commit

Permalink
Switch to double-quotes in an attempt to avoid "missing terminating ]…
Browse files Browse the repository at this point in the history
…" errors
  • Loading branch information
josegonzalez committed Oct 13, 2014
1 parent 75d2e40 commit 03fbcc2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Core/StaticConfigTrait.php
Expand Up @@ -176,11 +176,11 @@ public static function parseDsn($config = null) {
$dsn = $config['url'];
unset($config['url']);

if (preg_match('/^([\w\\]+)/', $dsn, $matches)) {
if (preg_match("/^([\w\\\]+)/", $dsn, $matches)) {
$scheme = explode('\\', $matches[2]);
$scheme = array_pop($scheme);
$driver = $matches[2];
$dsn = preg_replace('/^([\w\\]+)/', $scheme, $dsn);
$dsn = preg_replace("/^([\w\\\]+)/", $scheme, $dsn);
}

$parsed = parse_url($dsn);
Expand All @@ -206,7 +206,6 @@ public static function parseDsn($config = null) {
}

unset($config['user'], $config['pass']);

$config = array_filter($config, function ($value) {
return $value !== '';
});
Expand Down

0 comments on commit 03fbcc2

Please sign in to comment.