We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e50c4c9 + 8c03203 commit f3e14faCopy full SHA for f3e14fa
src/http-client/src/Response.php
@@ -64,7 +64,7 @@ public function body(): string
64
public function json(?string $key = null, mixed $default = null): mixed
65
{
66
if (! $this->decoded) {
67
- $this->decoded = json_decode($this->body(), true);
+ $this->decoded = json_decode($this->body(), true) ?? [];
68
}
69
70
if (is_null($key)) {
0 commit comments