From 59612e91b178e729ffd63cbabb0446fd51038e50 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 28 Oct 2006 18:50:23 +0000 Subject: --- system/database/DB_driver.php | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'system/database/DB_driver.php') 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; } -- cgit v1.2.3-24-g4f1b