diff --git a/wp-includes/html-api/class-wp-html-processor.php b/wp-includes/html-api/class-wp-html-processor.php index eeafca44f7..0511035607 100644 --- a/wp-includes/html-api/class-wp-html-processor.php +++ b/wp-includes/html-api/class-wp-html-processor.php @@ -543,7 +543,7 @@ class WP_HTML_Processor extends WP_HTML_Tag_Processor { // Avoid sending close events for elements which don't expect a closing. if ( WP_HTML_Stack_Event::POP === $this->current_element->operation && - ! static::expects_closer( $this->current_element->token->node_name ) + ! static::expects_closer( $this->current_element->token ) ) { return $this->next_token(); } diff --git a/wp-includes/html-api/class-wp-html-tag-processor.php b/wp-includes/html-api/class-wp-html-tag-processor.php index 99f37dcf08..dafa17daea 100644 --- a/wp-includes/html-api/class-wp-html-tag-processor.php +++ b/wp-includes/html-api/class-wp-html-tag-processor.php @@ -2265,7 +2265,7 @@ class WP_HTML_Tag_Processor { * @param int $shift_this_point Accumulate and return shift for this position. * @return int How many bytes the given pointer moved in response to the updates. */ - private function apply_attributes_updates( $shift_this_point = 0 ) { + private function apply_attributes_updates( $shift_this_point ) { if ( ! count( $this->lexical_updates ) ) { return 0; } @@ -2787,6 +2787,8 @@ class WP_HTML_Tag_Processor { case self::STATE_FUNKY_COMMENT: return '#funky-comment'; } + + return null; } /** @@ -3195,7 +3197,7 @@ class WP_HTML_Tag_Processor { * Keep track of the position right before the current tag. This will * be necessary for reparsing the current tag after updating the HTML. */ - $before_current_tag = $this->token_starts_at; + $before_current_tag = $this->token_starts_at ?? 0; /* * 1. Apply the enqueued edits and update all the pointers to reflect those changes. diff --git a/wp-includes/version.php b/wp-includes/version.php index b9ad2cc932..969baf30ba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6-beta1-58363'; +$wp_version = '6.6-beta1-58364'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.