diff --git a/Classes/Handler/Render/XpathRenderHandler.php b/Classes/Handler/Render/XpathRenderHandler.php index d68a41312..e15af003c 100644 --- a/Classes/Handler/Render/XpathRenderHandler.php +++ b/Classes/Handler/Render/XpathRenderHandler.php @@ -55,7 +55,7 @@ public function renderTemplate(TemplateConfiguration $templateConfiguration, arr return ''; } - protected function processContainer($node, $mappingConfiguration, $processedValues, $containerType, $mappingType = 'inner') + protected function processContainer(\DOMNode $node, array $mappingConfiguration, array $processedValues, string $containerType, string $mappingType = 'inner') { switch ($containerType) { case 'repeatable': @@ -159,6 +159,7 @@ protected function processValue($processingNode, $fieldName, array $mappingConfi protected function processValueInner(array $mappingConfiguration, \DOMNode $processingNode, array $processedValues, string $fieldName) { if (isset($mappingConfiguration['container']) && is_array($mappingConfiguration['container'])) { + $processedFieldValues = (is_array($processedValues[$fieldName]) ? $processedValues[$fieldName] : []); $this->processContainer($processingNode, $mappingConfiguration['container'], $processedValues[$fieldName], $mappingConfiguration['containerType'], 'inner'); return; } @@ -203,6 +204,7 @@ protected function processValueInner(array $mappingConfiguration, \DOMNode $proc protected function processValueOuter(array $mappingConfiguration, \DOMNode $processingNode, array $processedValues, string $fieldName): void { if (isset($mappingConfiguration['container']) && is_array($mappingConfiguration['container'])) { + $processedFieldValues = (is_array($processedValues[$fieldName]) ? $processedValues[$fieldName] : []); $this->processContainer($processingNode, $mappingConfiguration['container'], $processedValues[$fieldName], $mappingConfiguration['containerType'], 'outer'); return; }