Skip to content

Commit a707be7

Browse files
committed
fix compatibility with php 7.2
1 parent ebe8cdb commit a707be7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Body/RequestBody.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function toArray(): ?array
3131
}
3232

3333
try {
34-
$content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | \JSON_THROW_ON_ERROR);
34+
$content = json_decode($content, true, 512, \JSON_BIGINT_AS_STRING | (\PHP_VERSION_ID >= 70300 ? \JSON_THROW_ON_ERROR : 0));
3535
} catch (\JsonException $ex) {
3636
return null;
3737
}

0 commit comments

Comments
 (0)