Skip to content

Commit 1067267

Browse files
Merge branch '3.4' into 4.4
* 3.4: Fix exception messages containing exception messages
1 parent 88d1745 commit 1067267

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Response/ResponseTrait.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ public function toArray(bool $throw = true): array
153153
try {
154154
$content = json_decode($content, true, 512, JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? JSON_THROW_ON_ERROR : 0));
155155
} catch (\JsonException $e) {
156-
throw new JsonException(sprintf($e->getMessage().' for "%s".', $this->getInfo('url')), $e->getCode());
156+
throw new JsonException($e->getMessage().sprintf(' for "%s".', $this->getInfo('url')), $e->getCode());
157157
}
158158

159159
if (\PHP_VERSION_ID < 70300 && JSON_ERROR_NONE !== json_last_error()) {
160-
throw new JsonException(sprintf(json_last_error_msg().' for "%s".', $this->getInfo('url')), json_last_error());
160+
throw new JsonException(json_last_error_msg().sprintf(' for "%s".', $this->getInfo('url')), json_last_error());
161161
}
162162

163163
if (!\is_array($content)) {

0 commit comments

Comments
 (0)