Skip to content

Commit 9c9c4d2

Browse files
committed
fix: passing null to parameter of type string
ErrorException: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated
1 parent 567f0c6 commit 9c9c4d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/HTTP/IncomingRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ public function getVar($index = null, $filter = null, $flags = null)
520520
*/
521521
public function getJSON(bool $assoc = false, int $depth = 512, int $options = 0)
522522
{
523-
return json_decode($this->body, $assoc, $depth, $options);
523+
return json_decode($this->body ?? '', $assoc, $depth, $options);
524524
}
525525

526526
/**

0 commit comments

Comments
 (0)