Skip to content

Commit d1a9db6

Browse files
authored
$tok might be false in Tokenizer.php
ctype_alpha(false) triggers warning ctype_alpha(): Argument of type bool will be interpreted as string in the future
1 parent 897eb51 commit d1a9db6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/HTML5/Parser/Tokenizer.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,10 @@ protected function consumeData()
131131

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

134-
if ('!' === $tok) {
134+
if (false === $tok) {
135+
// end of string
136+
$this->parseError('Illegal tag opening');
137+
} elseif ('!' === $tok) {
135138
$this->markupDeclaration();
136139
} elseif ('/' === $tok) {
137140
$this->endTag();

0 commit comments

Comments
 (0)