Skip to content

Commit 5471aa2

Browse files
authored
Fix response error Request::call() method. (#7)
1 parent e91a283 commit 5471aa2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@
66

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

9-
* Fix `json_decode()` as associative array at `Request::call()` method.
9+
* Fix `json_decode()` as associative array at `Request::call()` method.
10+
11+
## `1.0.2` at `2021-05-29`
12+
13+
* Fix response error at `Request::call()` method.

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ public function call ()
594594
// Invalid response
595595
if ( $response_info['http_code'] < 200 || $response_info['http_code'] >= 300 )
596596
{
597-
$data = \json_decode( $http_body, true );
597+
$data = \json_decode( $http_body );
598598

599599
// Cannot decode json, restore raw body
600600
if ( \json_last_error() > 0 )

0 commit comments

Comments
 (0)