diff options
author | Halmai, Csongor <csongor@halmai.hu> | 2015-12-08 01:32:35 +0100 |
---|---|---|
committer | Halmai, Csongor <csongor@halmai.hu> | 2015-12-08 01:32:35 +0100 |
commit | 0f56007d95a8713f0c4276e37604e221f4efbe66 (patch) | |
tree | 2af9264676c1197cf63ff4a84784535b24a90d7a /system | |
parent | 5ced82ab986f6a53ca95f5498a63ac503ea8f580 (diff) |
rolling back previous solution; throwing exception if database connection was not successful.
Diffstat (limited to 'system')
-rw-r--r-- | system/core/Loader.php | 4 | ||||
-rw-r--r-- | system/database/DB_driver.php | 2 |
2 files changed, 1 insertions, 5 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 7593ae5d6..18e4c5287 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -361,10 +361,6 @@ class CI_Loader { // Load the DB class $CI->db =& DB($params, $query_builder); - if (!$CI->db->conn_id) - { - return FALSE; - } return $this; } diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index 25e70ec3f..fb9955b7c 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -436,7 +436,7 @@ abstract class CI_DB_driver { $this->display_error('db_unable_to_connect'); } - return FALSE; + throw new RuntimeException('Database connection failure.'); } } |