Skip to content

Commit

Permalink
$tok might be false in Tokenizer.php
Browse files Browse the repository at this point in the history
ctype_alpha(false) triggers warning ctype_alpha(): Argument of type bool will be interpreted as string in the future
  • Loading branch information
sakarikl authored Jan 11, 2023
1 parent 897eb51 commit d1a9db6
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 d1a9db6

Please sign in to comment.