From 50c382a07ad09cb690d78cdc0fae1d8d6c3e2378 Mon Sep 17 00:00:00 2001 From: Jeffrey Zant Date: Tue, 5 Sep 2023 13:53:35 +0200 Subject: [PATCH] Preventing array_merge_recursive with null value with super table --- src/fields/SuperTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fields/SuperTable.php b/src/fields/SuperTable.php index ad6c18cb..bc496c38 100644 --- a/src/fields/SuperTable.php +++ b/src/fields/SuperTable.php @@ -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; }