Skip to content

Commit

Permalink
Merge pull request #9 from bolt/bobdenotter-patch-1
Browse files Browse the repository at this point in the history
Ensure we merge the array recursive, so we don't overwrite default se…
  • Loading branch information
bobdenotter authored Oct 20, 2020
2 parents fce1f19 + 7224106 commit a516af0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ArticleConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Bolt\Article;

use Bolt\Common\Arr;
use Bolt\Configuration\Config;
use Bolt\Entity\Content;
use Bolt\Extension\ExtensionRegistry;
Expand Down Expand Up @@ -41,7 +42,7 @@ public function getConfig(): array
{
$extension = $this->registry->getExtension(Extension::class);

return array_merge($this->getDefaults(), $extension->getConfig()['default'], $this->getLinks());
return array_merge_recursive($this->getDefaults(), $extension->getConfig()['default'], $this->getLinks());
}

public function getPlugins(): array
Expand All @@ -51,7 +52,7 @@ public function getPlugins(): array
$plugins = $this->getDefaultPlugins();

if (is_array($extension->getConfig()['plugins'])) {
$plugins = array_merge($plugins, $extension->getConfig()['plugins']);
$plugins = array_merge_recursive($plugins, $extension->getConfig()['plugins']);
}

return $plugins;
Expand Down

0 comments on commit a516af0

Please sign in to comment.