Removed configs from environments and corrected for fallback
diff --git a/system/core/Common.php b/system/core/Common.php
index 48de161..5c441a5 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))
+ if ( ! file_exists($file_path))
{
- exit('The configuration file does not exist.');
+ $file_path = APPPATH.'config/config'.EXT;
+
+ if ( ! file_exists($file_path))
+ {
+ exit('The configuration file does not exist.');
+ }
}
- else
- {
- require(APPPATH.'config/'.ENVIRONMENT.'/config'.EXT);
- }
+
+ require($file_path);
// Does the $config array exist in the file?
if ( ! isset($config) OR ! is_array($config))