diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2012-03-08 07:22:40 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2012-03-08 07:22:40 +0400 |
commit | 4769bbf83f279d3511a98c51d7d2df731a2fe4f0 (patch) | |
tree | 986787ec6630bad852a6b173374c95847337b91a /core/Config.php | |
parent | 08a169d3259b3e78f0d96bd8f02aa9a047a70b64 (diff) |
Refs #1713
* keep sections that don't exist inglobal.ini.php (prevent NOTICE).
* save sections in order that they appear in global.ini.php
git-svn-id: http://dev.piwik.org/svn/trunk@6000 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Config.php')
-rw-r--r-- | core/Config.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/core/Config.php b/core/Config.php index 4c544b5305..5a672f08b5 100644 --- a/core/Config.php +++ b/core/Config.php @@ -381,9 +381,20 @@ class Piwik_Config } } - foreach($configCache as $name => $section) + foreach($configGlobal as $name => $section) { - $configLocal = $this->array_unmerge($configGlobal[$name], $configCache[$name]); + if(!isset($configCache[$name])) + { + continue; + } + + $configLocal = $configCache[$name]; + // Only merge if the section exists in Global.ini.php (in case a section only lives in config.ini.php) + if(isset($configGlobal[$name])) + { + $configLocal = $this->array_unmerge($configGlobal[$name], $configCache[$name]); + } + if (count($configLocal) == 0) { continue; |