summaryrefslogtreecommitdiffstats
path: root/system/core/Loader.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Loader.php')
-rw-r--r--system/core/Loader.php18
1 files changed, 7 insertions, 11 deletions
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 1e5eeecd5..3506a0ef1 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -952,18 +952,14 @@ class CI_Loader {
// merge with global cached vars (first call) or last state from nested
// call stack (subsequent nested calls)
- // if (!empty($this->_ci_vars_stack)) {
- // $_ci_vars = array_merge(end($this->_ci_vars_stack), $_ci_vars);
- // } else if (!empty($this->_ci_cached_vars)) {
- // // merge with cached vars
- // $_ci_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
- // }
-
- empty($_ci_vars) OR $this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
-
+ if (!empty($this->_ci_vars_stack)) {
+ $_ci_vars = array_merge(end($this->_ci_vars_stack), $_ci_vars);
+ } else if (!empty($this->_ci_cached_vars)) {
+ $_ci_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
+ }
// push current _ci_vars state to stack and extract it
- // array_push($this->_ci_vars_stack, $_ci_vars);
+ array_push($this->_ci_vars_stack, $_ci_vars);
extract($this->_ci_cached_vars);
/**
@@ -983,7 +979,7 @@ class CI_Loader {
log_message('info', 'File loaded: '.$_ci_path);
// remove current _ci_vars state from stack
- // array_pop($this->_ci_vars_stack);
+ array_pop($this->_ci_vars_stack);
// Return the file data if requested
if ($_ci_return === TRUE)