Skip to content

Commit

Permalink
Allow unsetting the db (ORM::set_db(null)) to make the test work again
Browse files Browse the repository at this point in the history
  • Loading branch information
Michel Kollenhoven authored and treffynnon committed Dec 26, 2013
1 parent 0140d27 commit 7346022
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions idiorm.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ protected static function _setup_db_config($connection_name) {
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);
}
}

/**
Expand Down

0 comments on commit 7346022

Please sign in to comment.