mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
cfd8102431
commit
a34f17f839
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user