FIX for #5028: Ensure empty YML configs don't break when merging them in (i.e. make sure it's traversable before foreach'ing over it).

This commit is contained in:
Patrick Nelson 2016-02-12 00:25:01 -05:00
parent cfd8102431
commit a34f17f839

View File

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