Skip to content

Commit

Permalink
Cast to string response body
Browse files Browse the repository at this point in the history
  • Loading branch information
debiasio committed Sep 24, 2018
1 parent 22146cf commit 5724c35
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 32 deletions.
65 changes: 34 additions & 31 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Prismic/Api.php
Expand Up @@ -229,7 +229,7 @@ public function previewSession(string $token, LinkResolver $linkResolver, string
throw Exception\RequestFailureException::fromGuzzleException($guzzleException);
}
/** @var \Psr\Http\Message\ResponseInterface $response */
$response = \json_decode($response->getBody());
$response = \json_decode((string) $response->getBody());
if (isset($response->mainDocument)) {
$documents = $this
->query(Predicates::at("document.id", $response->mainDocument), ['ref' => $token, 'lang' => '*'])
Expand Down

0 comments on commit 5724c35

Please sign in to comment.