Skip to content

Commit

Permalink
Replace array_merge with array_merge_recursive in ThemeController (Az…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sloyni authored Sep 2, 2022
1 parent 8f4a6ad commit dabf2ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Admin/ThemeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function update(string $theme)
if ($oldConfig !== null) {
$newConfig = $this->themes->readConfig($theme) ?? [];

$this->themes->updateConfig($theme, array_merge($newConfig, $oldConfig));
$this->themes->updateConfig($theme, array_merge_recursive($newConfig, $oldConfig));
}
}
} catch (Throwable $t) {
Expand Down Expand Up @@ -178,7 +178,7 @@ public function config(Request $request, string $theme)
$config = $this->validate($request, $this->files->getRequire($rulesPath));

if ($request->has('append')) {
$config = array_merge($this->themes->readConfig($theme), $config);
$config = array_merge_recursive($this->themes->readConfig($theme), $config);
}

$this->themes->updateConfig($theme, $config);
Expand Down

0 comments on commit dabf2ec

Please sign in to comment.