Skip to content

Commit

Permalink
Preventing array_merge_recursive with null value with super table
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyzant committed Sep 5, 2023
1 parent c30fb38 commit 50c382a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fields/SuperTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function parseField(): mixed

// Finish up with the content, also sort out cases where there's array content
if (isset($fieldData[$key]) && is_array($fieldData[$key])) {
$fieldData[$key] = array_merge_recursive($fieldData[$key], $parsedValue);
$fieldData[$key] = is_array($parsedValue) ? array_merge_recursive($fieldData[$key], $parsedValue) : $fieldData[$key];
} else {
$fieldData[$key] = $parsedValue;
}
Expand Down

0 comments on commit 50c382a

Please sign in to comment.