diff --git a/UPGRADE.md b/UPGRADE.md index 086d3ab8..32617b8d 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,5 +1,8 @@ # Upgrade Notes +## 5.0.3 +- Fix element type check in api channel [#423](https://github.com/dachcom-digital/pimcore-formbuilder/issues/423) + ## 5.0.2 - Fix Mail Layout Editor base path [#426](https://github.com/dachcom-digital/pimcore-formbuilder/issues/426) diff --git a/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php b/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php index 3b8d9a7d..b3ba625f 100644 --- a/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php +++ b/src/OutputWorkflow/Channel/Api/ApiOutputChannelWorker.php @@ -113,7 +113,7 @@ protected function buildApiNodes(array $nodes, array $formData, array $mapping, foreach ($apiMappingFields as $apiMappingField) { $context = [ - 'type' => $formField['type'], + 'type' => $formField['type'] ?? null, 'parentType' => $hasParent ? $parentType : null, 'formData' => $formData, 'formField' => $formField, @@ -121,6 +121,8 @@ protected function buildApiNodes(array $nodes, array $formData, array $mapping, ]; $nodes[$apiMappingField] = $this->findFormFieldValue($formField, $fieldTransformer, $context); + + unset($apiMappingField); } if ($hasChildren) {