TokenIterator: fix possible undefined index in consumeTokenType

This commit is contained in:
Jan Tvrdik 2017-11-19 10:24:28 +01:00
parent 1d80cde655
commit fd48a33359

View File

@ -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++;
}
}