Skip to content

Commit

Permalink
Check for in-range index
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Dec 19, 2023
1 parent 82f79f5 commit d16c5a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/html-api/class-wp-html-tag-processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ private function parse_next_tag() {

$this->token_starts_at = $at;

if ( '/' === $this->html[ $at + 1 ] ) {
if ( $doc_length > $at + 1 && '/' === $this->html[ $at + 1 ] ) {
$this->is_closing_tag = true;
++$at;
} else {
Expand Down

0 comments on commit d16c5a0

Please sign in to comment.