From 6e90eb8d18839cf6d482ac286ade461e1c9044f1 Mon Sep 17 00:00:00 2001 From: simon-matt-oetztal <130133335+simon-matt-oetztal@users.noreply.github.com> Date: Thu, 9 Jan 2025 10:07:08 +0100 Subject: [PATCH] [Bug]: API Channel: mapped numeric IDs get lost when using fieldsets (#495) (#496) --- src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php b/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php index b3ba625f..fc69a694 100644 --- a/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php +++ b/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php @@ -128,7 +128,7 @@ protected function buildApiNodes(array $nodes, array $formData, array $mapping, if ($hasChildren) { $apiField = $hasParent ? $nodes : []; if ($formField['type'] === 'fieldset' && count($apiMappingFields) === 0) { - $nodes = array_merge([], ...[$nodes, $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type'])]); + $nodes = array_replace([], ...[$nodes, $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type'])]); } else { foreach ($apiMappingFields as $apiMappingField) { $nodes[$apiMappingField] = $this->buildApiNodes($apiField, $formData, $mapRow['children'], true, $formField['type']);