Skip to content

Commit f7a9491

Browse files
committed
added both the JSON_THROW_ON_ERROR and JSON_INVALID_UTF8_IGNORE flag
1 parent fa02db3 commit f7a9491

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/php-parse

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ foreach ($files as $file) {
8282
echo $prettyPrinter->prettyPrintFile($stmts), "\n";
8383
} elseif ('json-dump' === $operation) {
8484
fwrite(STDERR, "==> JSON dump:\n");
85-
echo json_encode($stmts, JSON_PRETTY_PRINT), "\n";
85+
echo json_encode($stmts, JSON_PRETTY_PRINT | JSON_THROW_ON_ERROR | JSON_INVALID_UTF8_IGNORE), "\n";
8686
} elseif ('var-dump' === $operation) {
8787
fwrite(STDERR, "==> var_dump():\n");
8888
var_dump($stmts);

0 commit comments

Comments
 (0)