Skip to content

Commit

Permalink
json_decode(): Passing null to parameter #1 ($json) of type string is…
Browse files Browse the repository at this point in the history
… deprecated
  • Loading branch information
escopecz committed Jun 9, 2023
1 parent 6ecf557 commit a958f8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/MauticFocusBundle/Model/FocusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function saveEntity($entity, $unlock = true)
public function generateJavascript(Focus $focus, $isPreview = false, $byPassCache = false)
{
// If cached is not an array, rebuild to support the new format
$cached = json_decode($focus->getCache(), true);
$cached = $focus->getCache() ? json_decode($focus->getCache(), true) : [];
if ($isPreview || $byPassCache || empty($cached) || !isset($cached['js'])) {
$focusArray = $focus->toArray();

Expand Down

0 comments on commit a958f8c

Please sign in to comment.