diff options
author | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-28 22:56:46 +0200 |
---|---|---|
committer | Taufan Aditya <toopay@taufanaditya.com> | 2012-03-28 22:56:46 +0200 |
commit | a8a2e3325c128ccdc941daba3bba10b78bf2d098 (patch) | |
tree | 56f3896e8a2d24482159bcb16c5cacc556c75c90 /system | |
parent | 655a89f4059ebae017d1c4ec5f26aeb2cf4a3bae (diff) |
Travis setup and minor cleanup
Diffstat (limited to 'system')
-rwxr-xr-x | system/database/DB.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/system/database/DB.php b/system/database/DB.php index 96e495515..e9434231c 100755 --- a/system/database/DB.php +++ b/system/database/DB.php @@ -138,7 +138,12 @@ function &DB($params = '', $active_record_override = NULL) class CI_DB extends CI_DB_driver { } } - require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'); + // Load the DB driver + $driver_file = BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php'; + + if ( ! file_exists($driver_file)) show_error('Invalid DB driver'); + + require_once($driver_file); // Instantiate the DB adapter $driver = 'CI_DB_'.$params['dbdriver'].'_driver'; |