summaryrefslogtreecommitdiffstats
path: root/system/core/Config.php
diff options
context:
space:
mode:
authorEric Roberts <eric@cryode.com>2012-07-04 08:56:04 +0200
committerEric Roberts <eric@cryode.com>2012-07-04 08:56:04 +0200
commitd6ab7a297d26ab148d819ae7ca95c0e604abf188 (patch)
tree42a565177d20139b199abb6f8544d50fb628755c /system/core/Config.php
parentf2dcca6f9212923e54fb62ae58f79dc713b111ad (diff)
Moved redundant $check_locations definition out of loop.
Diffstat (limited to 'system/core/Config.php')
-rw-r--r--system/core/Config.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/system/core/Config.php b/system/core/Config.php
index 4b4e5a7ba..b21d7a588 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -102,13 +102,13 @@ class CI_Config {
{
$file = ($file === '') ? 'config' : str_replace('.php', '', $file);
$found = $loaded = FALSE;
+
+ $check_locations = defined('ENVIRONMENT')
+ ? array(ENVIRONMENT.'/'.$file, $file)
+ : array($file);
foreach ($this->_config_paths as $path)
{
- $check_locations = defined('ENVIRONMENT')
- ? array(ENVIRONMENT.'/'.$file, $file)
- : array($file);
-
foreach ($check_locations as $location)
{
$file_path = $path.'config/'.$location.'.php';