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