Skip to content

Commit 03aebd0

Browse files
authored
Merge pull request #160 from prismicio/develop
Cast to string response body
2 parents 22146cf + 5724c35 commit 03aebd0

File tree

2 files changed

+35
-32
lines changed

2 files changed

+35
-32
lines changed

composer.lock

+34-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Prismic/Api.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ public function previewSession(string $token, LinkResolver $linkResolver, string
229229
throw Exception\RequestFailureException::fromGuzzleException($guzzleException);
230230
}
231231
/** @var \Psr\Http\Message\ResponseInterface $response */
232-
$response = \json_decode($response->getBody());
232+
$response = \json_decode((string) $response->getBody());
233233
if (isset($response->mainDocument)) {
234234
$documents = $this
235235
->query(Predicates::at("document.id", $response->mainDocument), ['ref' => $token, 'lang' => '*'])

0 commit comments

Comments
 (0)