Browse Source

Use proper index for driver name

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

+ 2 - 2
src/Core/StaticConfigTrait.php

@@ -177,9 +177,9 @@ trait StaticConfigTrait {
 		unset($config['url']);
 
 		if (preg_match("/^([\w\\\]+)/", $dsn, $matches)) {
-			$scheme = explode('\\', $matches[2]);
+			$scheme = explode('\\', $matches[1]);
 			$scheme = array_pop($scheme);
-			$driver = $matches[2];
+			$driver = $matches[1];
 			$dsn = preg_replace("/^([\w\\\]+)/", $scheme, $dsn);
 		}