Skip to content

Commit 9052398

Browse files
authored
Fix validation of modified sparse ASTs (#1105)
1 parent 39998ae commit 9052398

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ You can find and compare releases at the [GitHub release page](https://github.co
116116
- Remove `Utils::find()`, `Utils::every()` and `Utils::invariant()`
117117
- Remove argument `bool $exitWhenDone` from `StandardServer::send500Error()` and `StandardServer::handleRequest()`
118118

119+
## 14.11.6
120+
121+
### Fixed
122+
123+
- Fix validation of modified sparse ASTs
124+
119125
## 14.11.5
120126

121127
### Fixed

src/Validator/QueryValidationContext.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ public function getFragmentSpreads(HasSelectionSet $node): array
209209
while (count($setsToVisit) > 0) {
210210
$set = array_pop($setsToVisit);
211211

212-
for ($i = 0, $selectionCount = count($set->selections); $i < $selectionCount; ++$i) {
213-
$selection = $set->selections[$i];
212+
foreach ($set->selections as $selection) {
214213
if ($selection instanceof FragmentSpreadNode) {
215214
$spreads[] = $selection;
216215
} else {

0 commit comments

Comments
 (0)