Skip to content

Commit fd48a33

Browse files
committed
TokenIterator: fix possible undefined index in consumeTokenType
1 parent 1d80cde commit fd48a33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Parser/TokenIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function consumeTokenType(int $tokenType)
8686

8787
$this->index++;
8888

89-
if ($this->tokens[$this->index][Lexer::TYPE_OFFSET] === Lexer::TOKEN_HORIZONTAL_WS) {
89+
if (($this->tokens[$this->index][Lexer::TYPE_OFFSET] ?? -1) === Lexer::TOKEN_HORIZONTAL_WS) {
9090
$this->index++;
9191
}
9292
}

0 commit comments

Comments
 (0)