Skip to content

Commit

Permalink
Merge pull request #1365 from SLASH2NL/develop
Browse files Browse the repository at this point in the history
Preventing array_merge_recursive with null value with super table, resolving #1364
  • Loading branch information
angrybrad authored Nov 25, 2023
2 parents 7d5d6b9 + 50c382a commit a2f4f16
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 a2f4f16

Please sign in to comment.