diff options
author | Michel Kollenhoven <[email protected]> | 2013-12-26 16:14:24 +0000 |
---|---|---|
committer | Simon Holywell <[email protected]> | 2013-12-26 16:14:24 +0000 |
commit | 7346022dcfadf628e8e3e89e31739ddcc02ead05 (patch) | |
tree | b7b2ddb745fb5e04bf7dcdf29d5afc70dec04dcf /idiorm.php | |
parent | 0140d2753a7973d880b6684eaa6cf4922d74b300 (diff) |
Allow unsetting the db (ORM::set_db(null)) to make the test work again
Diffstat (limited to 'idiorm.php')
-rw-r--r-- | idiorm.php | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -279,8 +279,10 @@ public static function set_db($db, $connection_name = self::DEFAULT_CONNECTION) { self::_setup_db_config($connection_name); self::$_db[$connection_name] = $db; - self::_setup_identifier_quote_character($connection_name); - self::_setup_limit_clause_style($connection_name); + if(!is_null(self::$_db[$connection_name])) { + self::_setup_identifier_quote_character($connection_name); + self::_setup_limit_clause_style($connection_name); + } } /** |