bolt/bolt — pull request #1786 by GawainLynch (2014-09-26 11:07:48+00:00)
Title: Use recursive array merging for getDefaultConfig() in loadConfigFile()

If an extension author specifies a default config that uses arrays for subvalues, the entire subvalue array will otherwise get overridden by incorrect/incomplete values.

```php
$default = array(
'templates' => array(
'parent' => 'parent.twig',
'child' => 'child.twig',
'navigation' => array(
'crumbs' => 'crumbs.twig'
)));

$yaml = array(
'templates' => array(
'parent' => 'parent.twig',
'child' => 'child.twig',
'navigation' => array(
'mycrumbs' => 'mycrumbs.twig'
)));

var_export(array_merge($default, $yaml));
var_export(array_merge_recursive($default, $yaml));
```

In the above, `array_merge` will make `$default['templates']['navigation']` contain only `array('mycrumbs' => 'mycrumbs.twig')` where the extension's author is checking for config values in `$return_val['templates']['navigation']['crumbs']`