diff --git a/src/Settings.php b/src/Settings.php index 6ffaa7e..0d0089a 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -153,7 +153,7 @@ class Settings implements \Iterator, \Countable // load local config without merging - we need it here for the mode $conf = $this->buildFileName(); - $localConf = false; + $localConf = []; if (file_exists($conf)) $localConf = require($conf); // if a mode was set in the constructor do not overwrite it @@ -169,7 +169,7 @@ class Settings implements \Iterator, \Countable $siteConf = $this->buildFileName(self::SITE); if (file_exists($siteConf)) { - $localConf = array_replace_recursive($this->settings, require($siteConf)); + $localConf = array_replace_recursive($localConf, require($siteConf)); } } @@ -177,7 +177,7 @@ class Settings implements \Iterator, \Countable if ( isset( $this->modes[ $this->mode ] ) ) { $modeConf = $this->buildFileName( $this->modes[ $this->mode ] ); - + if ( file_exists($modeConf) ) { $this->settings = array_replace_recursive( $this->settings, require($modeConf) ); diff --git a/tests/cfg/order/config/default.conf.php b/tests/cfg/order/config/default.conf.php index 1cdaca9..90020ca 100644 --- a/tests/cfg/order/config/default.conf.php +++ b/tests/cfg/order/config/default.conf.php @@ -1,4 +1,7 @@ 'prod', + 'answer' => 0, + 'testFile' => 'default', 'testFiles' => 'default', + 'testFiles2' => 'default' ];