Skip to content

Commit 8d54559

Browse files
committed
Port fix from #1272
1 parent 948310c commit 8d54559

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ You can find and compare releases at the [GitHub release page](https://github.co
101101
- Avoid calling defined functions named like lazily loaded types
102102
- Show actual error in debug entries
103103
- Deal with `iterable` in implementations of `PromiseAdapter::all()`
104-
- Accept AST where field arguments are not given
105104

106105
### Removed
107106

src/Executor/Values.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,11 @@ public static function getArgumentValues($def, Node $node, ?array $variableValue
183183
/** @var array<string, ArgumentNodeValue> $argumentValueMap */
184184
$argumentValueMap = [];
185185

186-
foreach ($node->arguments as $argumentNode) {
187-
$argumentValueMap[$argumentNode->name->value] = $argumentNode->value;
186+
// Might not be defined when an AST from JS is used
187+
if (isset($node->arguments)) {
188+
foreach ($node->arguments as $argumentNode) {
189+
$argumentValueMap[$argumentNode->name->value] = $argumentNode->value;
190+
}
188191
}
189192

190193
return static::getArgumentValuesForMap($def, $argumentValueMap, $variableValues, $node);

0 commit comments

Comments
 (0)