Skip to content

Commit 60a948c

Browse files
committed
Fixed a bug with nested inputs of the same type
1 parent 2bf447e commit 60a948c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Value/ConvertParserValueVisitor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ public function visitObjectVal(ObjectVal $objectVal) : InputValue
9696

9797
$inner = new \stdClass();
9898

99-
foreach ($this->type->getArguments() as $argument) {
99+
// ->toArray() call must be present, otherwise the internal iterator pointer would reset on nested inputs of the same type
100+
foreach ($this->type->getArguments()->toArray() as $argument) {
100101
$this->path->add($argument->getName() . ' <input field>');
101102

102103
if (\property_exists($objectVal->getValue(), $argument->getName())) {

0 commit comments

Comments
 (0)