Skip to content

Commit

Permalink
[BUGFIX] Check for nodes in ViewHelper arguments as well
Browse files Browse the repository at this point in the history
  • Loading branch information
s2b committed Jun 8, 2023
1 parent e939044 commit 5f8517c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Classes/Service/FluidService.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ public function extractNodeType(NodeInterface $node, string $nodeType, $recursiv
$node = $this->resolveEscapingNode($node);
$nodes = [];

foreach ($node->getChildNodes() as $childNode) {
$checkNodes = $node->getChildNodes();
if ($node instanceof ViewHelperNode) {
foreach ($node->getArguments() as $argument) {
if ($argument instanceof NodeInterface) {

This comment has been minimized.

Copy link
@s2b

s2b Jun 8, 2023

Author Collaborator

$node->getArguments() says that it returns NodeInterface instances, but in fact it also returns scalar values.

$checkNodes[] = $argument;
}
}
}

foreach ($checkNodes as $childNode) {
$childNode = $this->resolveEscapingNode($childNode);

if ($childNode instanceof $nodeType) {
Expand Down

0 comments on commit 5f8517c

Please sign in to comment.