We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bada68a commit 22dcdfdCopy full SHA for 22dcdfd
src/Parser/ParserException.php
@@ -7,6 +7,7 @@
7
use function assert;
8
use function json_encode;
9
use function sprintf;
10
+use const JSON_INVALID_UTF8_SUBSTITUTE;
11
use const JSON_UNESCAPED_SLASHES;
12
use const JSON_UNESCAPED_UNICODE;
13
@@ -84,7 +85,7 @@ public function getExpectedTokenValue(): ?string
84
85
86
private function formatValue(string $value): string
87
{
- $json = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
88
+ $json = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_INVALID_UTF8_SUBSTITUTE);
89
assert($json !== false);
90
91
return $json;
0 commit comments