Skip to content

Commit e3bdf8e

Browse files
handle empty body with CONTENT_TYPE_JSON
1 parent e9f738a commit e3bdf8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Pecee/Http/Input/InputHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function parseInputs(): void
104104
switch($this->request->getContentType()){
105105
case Request::CONTENT_TYPE_JSON:
106106
$body = json_decode($this->originalBodyPlain, true);
107-
if ($body !== false) {
107+
if ($body !== false && $body !== null) {
108108
$this->originalBody = $body;
109109
$this->data = $this->parseInputItem($body);
110110
}

0 commit comments

Comments
 (0)