From 615e387a637bd26a1017f66da640c98061696fd5 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 4 Jun 2024 17:38:30 +0200 Subject: [PATCH 1/2] Fix non-static method called statically The is_tag_closer() method is not static and should be called as an instance method. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 93d74b5d1cd8e..affa32f09302e 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -428,7 +428,7 @@ public function next_tag( $query = null ) { continue; } - if ( ! $this::is_tag_closer() || $visit_closers ) { + if ( ! $this->is_tag_closer() || $visit_closers ) { return true; } } From 563c66940496afd19eba8d1cea031ced9406cfa7 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Tue, 4 Jun 2024 17:43:57 +0200 Subject: [PATCH 2/2] Fix call to parent is_tag_closer() should be $this In order to respect stack operations the HTML Processor should call its implementation of the is_tag_closer() method in the next_tag method. --- src/wp-includes/html-api/class-wp-html-processor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index affa32f09302e..eaa67e93002ec 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -463,7 +463,7 @@ public function next_tag( $query = null ) { continue; } - if ( ! parent::is_tag_closer() || $visit_closers ) { + if ( ! $this->is_tag_closer() || $visit_closers ) { return true; } }