diff options
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r-- | system/core/Loader.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php index 278a868e6..e75805d0e 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -872,12 +872,12 @@ class CI_Loader { // We test for both uppercase and lowercase, for servers that // are case-sensitive with regard to file names. Check for environment // first, global next - if (file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).EXT)) + if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).EXT)) { include_once($path .'config/'.ENVIRONMENT.'/'.strtolower($class).EXT); break; } - elseif (file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).EXT)) + elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).EXT)) { include_once($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).EXT); break; @@ -965,7 +965,7 @@ class CI_Loader { */ function _ci_autoloader() { - if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT)) + if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT)) { include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT); } |