Skip to content

Commit

Permalink
[BUGFIX] XPathRenderer: Gurentee calling container process with array…
Browse files Browse the repository at this point in the history
… of processed values

Resolves: #578
Release: 12.0.1 8.2.0
  • Loading branch information
opi99 committed Sep 18, 2024
1 parent f906e19 commit 5e37b01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Classes/Handler/Render/XpathRenderHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 5e37b01

Please sign in to comment.