Skip to content

Commit d3a6805

Browse files
add array check for $currentOpts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent a25774c commit d3a6805

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prestashop8.x/controllers/admin/AdminTawktoController.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ public function ajaxProcessSetOptions()
243243
$currentOpts = Configuration::get($key);
244244
if (!empty($currentOpts)) {
245245
$currentOpts = json_decode($currentOpts, true);
246-
$jsonOpts = array_merge($currentOpts, $jsonOpts);
246+
if (is_array($currentOpts)) {
247+
$jsonOpts = array_merge($currentOpts, $jsonOpts);
248+
}
247249
}
248250

249251
Configuration::updateValue($key, json_encode($jsonOpts));

0 commit comments

Comments
 (0)