Skip to content

Commit 672f3fc

Browse files
committed
fix initial value pass by reference error in executeFields in inner closure
1 parent 4d195cc commit 672f3fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Execution/Executor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private function shouldIncludeNode(ExecutionContext $executionContext, $node): b
235235
public function executeFields(ExecutionContext $executionContext, GraphQLObjectType $parentType, $sourceValue, $path, $fields)
236236
{
237237
$initial = [];
238-
return array_reduce(array_keys($fields), function (&$results, $responseName) use ($executionContext, $parentType, $sourceValue, $path, $fields) {
238+
return array_reduce(array_keys($fields), function ($results, $responseName) use ($executionContext, $parentType, $sourceValue, $path, $fields) {
239239
$fieldNodes = $fields[$responseName];
240240
$fieldPath = [$path, $responseName, $parentType->getName()];
241241

0 commit comments

Comments
 (0)