Skip to content

Commit

Permalink
Fix constant check
Browse files Browse the repository at this point in the history
  • Loading branch information
johannescoetzee committed Jan 2, 2025
1 parent 55d390a commit 599ac49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/php-parse
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ foreach ($files as $file) {
} elseif ('json-dump' === $operation) {
fwrite(STDERR, "==> JSON dump:\n");
$jsonSubstitute = 0;
if (defined(JSON_INVALID_UTF8_SUBSTITUTE)) {
if (defined('JSON_INVALID_UTF8_SUBSTITUTE')) {
$jsonSubstitute = JSON_INVALID_UTF8_SUBSTITUTE;
} elseif (defined(JSON_PARTIAL_OUTPUT_ON_ERROR)) {
} elseif (defined('JSON_PARTIAL_OUTPUT_ON_ERROR')) {
$jsonSubstitute = JSON_PARTIAL_OUTPUT_ON_ERROR;
}
echo json_encode($stmts, JSON_PRETTY_PRINT | $jsonSubstitute), "\n";
Expand Down

0 comments on commit 599ac49

Please sign in to comment.