Skip to content

Commit

Permalink
Merge pull request #3214 from MathiasReker/0-is-null
Browse files Browse the repository at this point in the history
Is null
  • Loading branch information
l0gicgate authored Jul 7, 2022
2 parents 4a61e28 + 34c313f commit fbb442e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Slim/Middleware/BodyParsingMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected function parseBody(ServerRequestInterface $request)
$body = (string)$request->getBody();
$parsed = $this->bodyParsers[$mediaType]($body);

if (!is_null($parsed) && !is_object($parsed) && !is_array($parsed)) {
if ($parsed !== null && !is_object($parsed) && !is_array($parsed)) {
throw new RuntimeException(
'Request body media type parser return value must be an array, an object, or null'
);
Expand Down

0 comments on commit fbb442e

Please # to comment.