Skip to content

Commit 0f56007

Browse files
committed
rolling back previous solution; throwing exception if database connection was not successful.
1 parent 5ced82a commit 0f56007

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

system/core/Loader.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,10 +361,6 @@ public function database($params = '', $return = FALSE, $query_builder = NULL)
361361

362362
// Load the DB class
363363
$CI->db =& DB($params, $query_builder);
364-
if (!$CI->db->conn_id)
365-
{
366-
return FALSE;
367-
}
368364
return $this;
369365
}
370366

system/database/DB_driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ public function initialize()
436436
$this->display_error('db_unable_to_connect');
437437
}
438438

439-
return FALSE;
439+
throw new RuntimeException('Database connection failure.');
440440
}
441441
}
442442

0 commit comments

Comments
 (0)