summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php17
1 files changed, 11 insertions, 6 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 48de161d2..5c441a56e 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/'.ENVIRONMENT.'/config'.EXT))
- {
- exit('The configuration file does not exist.');
- }
- else
+ if ( ! file_exists($file_path))
{
- require(APPPATH.'config/'.ENVIRONMENT.'/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))