diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-24 20:47:39 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-24 20:48:08 +0200 |
commit | 9d0ab04e1e39bc93c59f60844dd2cf9176443028 (patch) | |
tree | 91fc6c6f737676c6f80fba8d53e5b60e3ba3b5a4 /system/core/Loader.php | |
parent | f795ab52dadaef20afd3a97ad4c8ed408e211dc2 (diff) |
Fix #191
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r-- | system/core/Loader.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 5de2e5dde..b316c8e1b 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -318,9 +318,9 @@ class CI_Loader { /** * Database Loader * - * @param string the DB credentials - * @param bool whether to return the DB object - * @param bool whether to enable query builder (this allows us to override the config setting) + * @param mixed $params = '' the DB settings + * @param bool $return = FALSE whether to return the DB object + * @param bool $query_builder = NULL whether to enable query builder (overrides the config setting) * @return object */ public function database($params = '', $return = FALSE, $query_builder = NULL) @@ -329,7 +329,7 @@ class CI_Loader { $CI =& get_instance(); // Do we even need to load the database class? - if (class_exists('CI_DB') && $return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db)) + if ($return === FALSE && $query_builder === NULL && isset($CI->db) && is_object($CI->db) && ! empty($CI->db->conn_id)) { return FALSE; } |