diff --git a/classes/PrettyBlocksModel.php b/classes/PrettyBlocksModel.php index e897cec4..f51371fe 100644 --- a/classes/PrettyBlocksModel.php +++ b/classes/PrettyBlocksModel.php @@ -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']);