Browse Source

Switch to double-quotes in an attempt to avoid "missing terminating ]" errors

Jose Diaz-Gonzalez 11 years ago
parent
commit
03fbcc2dfe
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/Core/StaticConfigTrait.php

+ 2 - 3
src/Core/StaticConfigTrait.php

@@ -176,11 +176,11 @@ trait StaticConfigTrait {
 		$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);
@@ -206,7 +206,6 @@ trait StaticConfigTrait {
 		}
 
 		unset($config['user'], $config['pass']);
-
 		$config = array_filter($config, function ($value) {
 			return $value !== '';
 		});