-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tokenizer: derefencing incorrectly identified as short array #1381
Comments
I've committed a fix for this. The 7.1 tests are only failing because of the PHPUnit version. Thanks for reporting this. |
@gsherwood Thanks for the quick fix! |
Uh oh... looks like this fix broke the tokenizer for normal array referencing.... The first set of square brackets on each line in the below example code are now tokenized as short array openers/closers. echo $this->addedCustomFunctions['nonce'];
echo $this->deprecated_functions[ $function_name ]['version']; Debug output:
|
Thanks. I couldn't figure out why a bit of code was in the tokenizer, and I had no tests failing after removing it, but this is exactly the case it was checking for. I just couldn't see the syntax in my head - bit of a brain explosion. Anyway, I've put some tests in to catch the problem now, and fixed it again. Please let me know if you see any more array issues from this. |
@gsherwood Thanks ever so much for the quick fix. Will let you know if I find any other breakages. |
The array dereferencing square brackets in the following code are incorrectly changed to short array tokens.
Debug output:
The text was updated successfully, but these errors were encountered: