mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-11-30 04:29:20 +01:00
TokenIterator: fix possible undefined index in consumeTokenType
This commit is contained in:
parent
1d80cde655
commit
fd48a33359
@ -86,7 +86,7 @@ class TokenIterator
|
||||
|
||||
$this->index++;
|
||||
|
||||
if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] === Lexer::TOKEN_HORIZONTAL_WS) {
|
||||
if (($this->tokens[$this->index][Lexer::TYPE_OFFSET] ?? -1) === Lexer::TOKEN_HORIZONTAL_WS) {
|
||||
$this->index++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user