Skip to content

Commit

Permalink
fix: passing null to parameter of type string
Browse files Browse the repository at this point in the history
ErrorException: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated
  • Loading branch information
kenjis committed Nov 26, 2021
1 parent 567f0c6 commit 9c9c4d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/HTTP/IncomingRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ public function getVar($index = null, $filter = null, $flags = null)
*/
public function getJSON(bool $assoc = false, int $depth = 512, int $options = 0)
{
return json_decode($this->body, $assoc, $depth, $options);
return json_decode($this->body ?? '', $assoc, $depth, $options);
}

/**
Expand Down

0 comments on commit 9c9c4d2

Please sign in to comment.