mirror of
https://github.com/danog/phpdoc-parser.git
synced 2024-12-02 09:28:02 +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++;
|
$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++;
|
$this->index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user