Skip to content

Commit

Permalink
Merge pull request #30 from chuchvara/master
Browse files Browse the repository at this point in the history
Fix HTTP2 throwing error while parsing HTTP Location header
  • Loading branch information
spencerhunter authored Dec 26, 2018
2 parents 3ca1872 + 50ad4eb commit 50b8692
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function callApi($resourcePath, $method, $queryParams, $postData,
} else if ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
$data = json_decode($http_body);
if ($response_info['http_code'] == 201) {
$data = is_null(self::http_parse_headers($http_header)["Location"])
$data = !isset(self::http_parse_headers($http_header)["Location"])
? self::http_parse_headers($http_header)["location"]
: self::http_parse_headers($http_header)["Location"];
}
Expand Down

0 comments on commit 50b8692

Please sign in to comment.