diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php
index 588d2fbe7d..223fcda76a 100644
--- a/wp-includes/html-api/class-wp-html-processor.php
+++ b/wp-includes/html-api/class-wp-html-processor.php
@@ -2771,7 +2771,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
while (
( $no_exclusions || ! $this->state->stack_of_open_elements->current_node_is( $except_for_this_element ) ) &&
- in_array( $this->state->stack_of_open_elements->current_node(), $elements_with_implied_end_tags, true )
+ in_array( $this->state->stack_of_open_elements->current_node()->node_name, $elements_with_implied_end_tags, true )
) {
$this->state->stack_of_open_elements->pop();
}
@@ -2811,7 +2811,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor {
'TR',
);
- while ( in_array( $this->state->stack_of_open_elements->current_node(), $elements_with_implied_end_tags, true ) ) {
+ while ( in_array( $this->state->stack_of_open_elements->current_node()->node_name, $elements_with_implied_end_tags, true ) ) {
$this->state->stack_of_open_elements->pop();
}
}
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 384897b2ef..eb8deaade7 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '6.7-alpha-58694';
+$wp_version = '6.7-alpha-58702';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.