Created
August 13, 2014 05:01
-
-
Save mateusz/dc48410719674bc258ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --cc model/DB.php | |
index 985a420,5f215a6..0000000 | |
--- a/model/DB.php | |
+++ b/model/DB.php | |
@@@ -233,13 -171,9 +233,13 @@@ class DB | |
self::$connection_attempted = true; | |
$dbClass = $databaseConfig['type']; | |
- $conn = Injector::inst()->create($dbClass, $databaseConfig); | |
- // Using Injector->get allows us to use registered configurations | |
- self::setConn($conn, $label); | |
++ // Using Injector->create allows us to use registered configurations | |
+ // which may or may not map to explicit objects | |
- $conn = Injector::inst()->get($dbClass); | |
++ $conn = Injector::inst()->create($dbClass); | |
+ $conn->connect($databaseConfig); | |
+ | |
+ self::set_conn($conn, $label); | |
return $conn; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment