Skip to content

Commit

Permalink
Merge pull request #187 from PubliAlex/main
Browse files Browse the repository at this point in the history
Fix error when uploading image (PrettyBlocksModel.php)
  • Loading branch information
PrestaSafe authored Jan 25, 2024
2 parents e00aa2a + f64bed3 commit 474bd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/PrettyBlocksModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ public function updateConfig($stateRequest)
$fields[$key] = $obj;
}
$this->setConfigFields($fields);
$existingConfig = json_decode($this->config, true);
$newConfig = json_decode($this->generateJsonConfig(), true);
$existingConfig = json_decode($this->config, true) ?? [];
$newConfig = json_decode($this->generateJsonConfig(), true) ?? [];
$mergedConfig = array_merge($existingConfig, $newConfig);
$this->config = json_encode($mergedConfig, true);
$template_name = pSQL($stateRequest['templateSelected']);
Expand Down

0 comments on commit 474bd01

Please sign in to comment.