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 051103560787..528c222335b7 100644
--- a/src/wp-includes/html-api/class-wp-html-processor.php
+++ b/src/wp-includes/html-api/class-wp-html-processor.php
@@ -429,7 +429,7 @@ public function next_tag( $query = null ) {
continue;
}
- if ( ! $this::is_tag_closer() || $visit_closers ) {
+ if ( ! $this->is_tag_closer() || $visit_closers ) {
return true;
}
}
@@ -464,7 +464,7 @@ public function next_tag( $query = null ) {
continue;
}
- if ( ! parent::is_tag_closer() || $visit_closers ) {
+ if ( ! $this->is_tag_closer() || $visit_closers ) {
return true;
}
}