Skip to content

Commit

Permalink
Merge branch 'feature/tokenizer-php-match-minor-bugfix' of https://gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
gsherwood committed Feb 23, 2021
2 parents 5a63e78 + a5f9784 commit fed6752
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Tokenizers/PHP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,9 @@ protected function tokenize($string)

// Next was an open parenthesis, now check what is before the match keyword.
for ($y = ($stackPtr - 1); $y >= 0; $y--) {
if (isset(Util\Tokens::$emptyTokens[$tokens[$y][0]]) === true) {
if (is_array($tokens[$y]) === true
&& isset(Util\Tokens::$emptyTokens[$tokens[$y][0]]) === true
) {
continue;
}

Expand Down

0 comments on commit fed6752

Please sign in to comment.