Skip to content

Commit

Permalink
Fix response error Request::call() method. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
caiquearaujo committed May 29, 2021
1 parent e91a283 commit 5471aa2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@

## `1.0.1` at `2021-05-29`

* Fix `json_decode()` as associative array at `Request::call()` method.
* Fix `json_decode()` as associative array at `Request::call()` method.

## `1.0.2` at `2021-05-29`

* Fix response error at `Request::call()` method.
2 changes: 1 addition & 1 deletion src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ public function call ()
// Invalid response
if ( $response_info['http_code'] < 200 || $response_info['http_code'] >= 300 )
{
$data = \json_decode( $http_body, true );
$data = \json_decode( $http_body );

// Cannot decode json, restore raw body
if ( \json_last_error() > 0 )
Expand Down

0 comments on commit 5471aa2

Please sign in to comment.