From 5ced82ab986f6a53ca95f5498a63ac503ea8f580 Mon Sep 17 00:00:00 2001 From: "Halmai, Csongor" Date: Mon, 7 Dec 2015 13:20:39 +1100 Subject: Detecting if database connection was not successful --- system/core/Loader.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'system') diff --git a/system/core/Loader.php b/system/core/Loader.php index 18e4c5287..7593ae5d6 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -361,6 +361,10 @@ class CI_Loader { // Load the DB class $CI->db =& DB($params, $query_builder); + if (!$CI->db->conn_id) + { + return FALSE; + } return $this; } -- cgit v1.2.3-24-g4f1b