diff options
Diffstat (limited to 'system/database/DB_driver.php')
-rw-r--r-- | system/database/DB_driver.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index d08e47f26..49ac8ab24 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -154,16 +154,19 @@ class CI_DB_driver { } // Select the database - if ( ! $this->db_select()) + if ($this->database != '') { - log_message('error', 'Unable to select database: '.$this->database); - - if ($this->db_debug) + if ( ! $this->db_select()) { - $this->display_error('db_unable_to_select', $this->database); + log_message('error', 'Unable to select database: '.$this->database); + + if ($this->db_debug) + { + $this->display_error('db_unable_to_select', $this->database); + } + return FALSE; } - return FALSE; - } + } return TRUE; } |