mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
API Use injector to create database class
This commit is contained in:
parent
9912410e7b
commit
b8f4576647
@ -171,7 +171,7 @@ class DB {
|
||||
self::$connection_attempted = true;
|
||||
|
||||
$dbClass = $databaseConfig['type'];
|
||||
$conn = new $dbClass($databaseConfig);
|
||||
$conn = Injector::inst()->create($dbClass, $databaseConfig);
|
||||
|
||||
self::setConn($conn, $label);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user