Skip to content

Commit

Permalink
Fixing issue where merging config with an array of items would cause …
Browse files Browse the repository at this point in the history
…multi-level arrays to be produced.
  • Loading branch information
Bradley Cornford committed May 16, 2016
1 parent 99bb500 commit 15cddd5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Cornford/Setter/SettingBase.php
Expand Up @@ -184,7 +184,7 @@ protected function combineResults(array $results = array(), $key)
$config = $this->returnConfig($key);

if (is_array($config)) {
return array_replace_recursive($config, $results);
return array_replace_recursive($config, ((array_key_exists($key, $results) || array_key_exists('', $results)) ? reset($results) : $results));
}

return $results;
Expand Down

0 comments on commit 15cddd5

Please sign in to comment.