Skip to content

Commit 2c12bb8

Browse files
committed
Fix another create fragment at current node error
1 parent c9a2343 commit 2c12bb8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

html-api-debugger/html-api-integration.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ function get_tree( string $html, array $options ): array {
100100
$processor_bookmarks = new ReflectionProperty( WP_HTML_Processor::class, 'bookmarks' );
101101
$processor_bookmarks->setAccessible( true );
102102

103-
$cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
104-
$cfacn->setAccessible( true );
103+
if ( method_exists( WP_HTML_Processor::class, 'create_fragment_at_current_node' ) ) {
104+
$cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
105+
$cfacn->setAccessible( true );
106+
}
105107

106108
$is_fragment_processor = false;
107109

html-api-debugger/readme.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Please file issues and pull requests on the [GitHub repository](https://github.c
1717

1818
= 2.6 =
1919
* Handle null bytes in selectors and context HTML.
20+
* Fix another error when using WordPress 6.7.
2021

2122
= 2.5 =
2223
* Fix a crash when using WordPress 6.7.

0 commit comments

Comments
 (0)