Skip to content

Commit f6421f2

Browse files
author
Julien Neuhart
authored
Fix PHPStan issue with max method
1 parent f5a5d32 commit f6421f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Controller/GraphqliteController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private function handlePsr7Request(ServerRequestInterface $request, Request $sym
108108
}, $result);
109109
// Let's return the highest result.
110110
$statuses = array_map([$httpCodeDecider, 'decideHttpStatusCode'], $result);
111-
$status = max($statuses);
111+
$status = empty($statuses) ? 500 : max($statuses);
112112
return new JsonResponse($finalResult, $status);
113113
}
114114
if ($result instanceof Promise) {

0 commit comments

Comments
 (0)