Skip to content
This repository was archived by the owner on Dec 22, 2019. It is now read-only.

Commit faf483c

Browse files
authored
Merge pull request #147 from jni-heyloyalty/patch-1
Fix handling of empty body in ctor
2 parents 8f7bf74 + 8fb21ef commit faf483c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Response
3434
public function __construct(stdClass $response)
3535
{
3636
$this->status = $response->http_response_code;
37-
$this->message = $response->http_response_body->message;
37+
$this->message = property_exists($response->http_response_body, 'message') ? $response->http_response_body->message : '';
3838
$this->id = property_exists($response->http_response_body, 'id') ? $response->http_response_body->id : '';
3939
$this->data = null;
4040
}

0 commit comments

Comments
 (0)