diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-09 11:08:36 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-03-09 11:08:36 +0100 |
commit | 93ca71552d9a3e28eeaa00dd10755d20b2cbf32e (patch) | |
tree | 660233f2ec631e5730731491d2fd244fe15f7df8 /system/core/Common.php | |
parent | a9924b8352aa18869677bea0182c45e2a7e2ce37 (diff) | |
parent | 2f8b27efeb0a39c24eddf89cf31ea0fd113a6b71 (diff) |
Merged recent Core changes and fixed conflict.
Diffstat (limited to 'system/core/Common.php')
-rw-r--r-- | system/core/Common.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php index b5adfacb3..cd6b93355 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -208,15 +208,20 @@ return $_config[0]; } + $file_path = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT; + // Fetch the config file - if ( ! file_exists(APPPATH.'config/config'.EXT)) - { - exit('The configuration file does not exist.'); - } - else + if ( ! file_exists($file_path)) { - require(APPPATH.'config/config'.EXT); + $file_path = APPPATH.'config/config'.EXT; + + if ( ! file_exists($file_path)) + { + exit('The configuration file does not exist.'); + } } + + require($file_path); // Does the $config array exist in the file? if ( ! isset($config) OR ! is_array($config)) |