Skip to content

Commit

Permalink
Merge pull request #221 from sakarikl/sakarikl-ctype-warning
Browse files Browse the repository at this point in the history
$tok might be false in Tokenizer.php
  • Loading branch information
goetas authored Apr 26, 2023
2 parents d71fbc4 + d1a9db6 commit 3c5d5a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/HTML5/Parser/Tokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ protected function consumeData()

$tok = $this->scanner->next();

if ('!' === $tok) {
if (false === $tok) {
// end of string
$this->parseError('Illegal tag opening');
} elseif ('!' === $tok) {
$this->markupDeclaration();
} elseif ('/' === $tok) {
$this->endTag();
Expand Down

0 comments on commit 3c5d5a5

Please sign in to comment.