Skip to content

Commit 05554dd

Browse files
committed
Unbreak for 6.7
1 parent cccacc9 commit 05554dd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ class_exists( '\WP_CSS_Complex_Selector_List' )
2626
* @return string|null The normalized HTML or null if not supported.
2727
*/
2828
function get_normalized_html( string $html, array $options ): ?string {
29-
$cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
30-
$cfacn->setAccessible( true );
29+
if ( method_exists( WP_HTML_Processor::class, 'create_fragment_at_current_node' ) ) {
30+
$cfacn = new ReflectionMethod( WP_HTML_Processor::class, 'create_fragment_at_current_node' );
31+
$cfacn->setAccessible( true );
32+
}
3133

3234
if (
3335
method_exists( WP_HTML_Processor::class, 'create_fragment_at_current_node' ) &&

0 commit comments

Comments
 (0)