Merge pull request #5032 from patricknelson/issue-5028-yaml-errors-empty

FIX for #5028: Ensure empty YML configs don't break when merging them in.
This commit is contained in:
Damian Mooyman 2016-02-19 15:34:17 +13:00
commit 17b42a3f89

View File

@ -652,8 +652,10 @@ class SS_ConfigManifest {
* @return void
*/
public function mergeInYamlFragment(&$into, $fragment) {
foreach ($fragment as $k => $v) {
Config::merge_high_into_low($into[$k], $v);
if (is_array($fragment) || ($fragment instanceof Traversable)) {
foreach ($fragment as $k => $v) {
Config::merge_high_into_low($into[$k], $v);
}
}
}