Skip to content

Commit e7cde5e

Browse files
committed
Fixed broken 5.4 build
1 parent bc4b990 commit e7cde5e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Validator/Rules/QueryComplexity.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ public function __invoke(ValidationContext $context)
9494
},
9595
NodeKind::OPERATION_DEFINITION => [
9696
'leave' => function (OperationDefinitionNode $operationDefinition) use ($context, &$complexity) {
97-
if (empty($context->getErrors())) {
97+
$errors = $context->getErrors();
98+
99+
if (empty($errors)) {
98100
$complexity = $this->fieldComplexity($operationDefinition, $complexity);
99101

100102
if ($complexity > $this->getMaxQueryComplexity()) {

0 commit comments

Comments
 (0)