Skip to content

Commit a697e9e

Browse files
committed
fixup! Remove JSON_THROW_ON_ERROR constant
1 parent ba54ae4 commit a697e9e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/phpunit/tests/html-api/wpHtmlTagProcessorModifiableText.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,8 @@ public function test_json_auto_escaping() {
626626
// Reprocess to ensure JSON value survives HTML round trip:
627627
$processor = new WP_HTML_Tag_Processor( $expected );
628628
$processor->next_tag( 'SCRIPT' );
629-
$decoded_json_from_html = json_decode( $processor->get_modifiable_text(), true, 512, JSON_THROW_ON_ERROR );
629+
$decoded_json_from_html = json_decode( $processor->get_modifiable_text(), true );
630+
$this->assertSame( JSON_ERROR_NONE, json_last_error(), 'Precondition failed, JSON did not decode as expected: ' . json_last_error_msg() );
630631
$this->assertEquals(
631632
$expected_decoded_json,
632633
$decoded_json_from_html

0 commit comments

Comments
 (0)