mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Don't throw a notice-level error in DB::getConn() if connection hasn't been set yet, to mimic previous behaviour.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@87131 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
47e3d28c89
commit
b8617a5cab
@ -44,7 +44,9 @@ class DB {
|
||||
* @return Database
|
||||
*/
|
||||
static function getConn($name = 'default') {
|
||||
return self::$connections[$name];
|
||||
if(isset(self::$connections[$name])) {
|
||||
return self::$connections[$name];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user