Commit c3feaf3b by yeran

fix the bug of 204 code with content json back

1 parent 4eb5f5ee
Showing with 3 additions and 0 deletions
...@@ -57,6 +57,9 @@ class HttpException extends RuntimeException ...@@ -57,6 +57,9 @@ class HttpException extends RuntimeException
public function getBody() public function getBody()
{ {
if($this->getCode()==204){
return null;
}
return json_encode([ return json_encode([
'jsonapi' => ['version' => '1.0'], 'jsonapi' => ['version' => '1.0'],
'error' => $this->getCode(), 'error' => $this->getCode(),
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!