storyblok / storyblok-php-client

Storyblok - PHP Client
https://www.storyblok.com
MIT License
34 stars 37 forks source link

Storyblok\Client::$responseCode sometimes empty #19

Closed hellodev-justin closed 2 years ago

hellodev-justin commented 4 years ago

The issue seems to be that Storyblok\Client::_assignState($response) does not retain $response->httpResponseCode.

Suggested fix to src/Storyblok/Client.php:

private function _assignState($response) {
    $this->responseBody = $response->httpResponseBody;
    $this->responseHeaders = $response->httpResponseHeaders;
    $this->responseCode = $response->httpResponseCode; // retain responseCode 
}
joaokamun commented 2 years ago

Issue solved with #46. Thanks!