-
Notifications
You must be signed in to change notification settings - Fork 40
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
Internal Exception // Undefined index: scope_opener PreGetPostsSniff.php on line 314 #499
Comments
@metalandcoffee Hiya, would we be able to get your copy of |
@metalandcoffee I believe I have a fix for this issue, though I'd still very much would like to see the original code which triggered the error. In the mean time, it would be awesome if you could test the fix I've pulled in PR #565 and could let us know if that fixes it for you. |
Hi @rebeccahum & @jrfnl !!! I'm sorry for the delay. Here is the I'm going to test the fix now! |
@jrfnl I'm not getting that error anymore! ✨ |
@metalandcoffee Thanks for testing. I've had a look at the code and the issue was caused by the inline control structure use, i.e. As it is, the sniff would now throw a false positive for your code "Main WP_Query is being modified without Let me see if I can add a quick fix for that too. |
@metalandcoffee I've updated PR #565 with an additional fix to handle inline control structures better. |
Bug Description
The first error that occurs when I lint my
functions.php
is the following:An error occurred during processing; checking has been aborted. The error message was: Undefined index: scope_opener in /.../WordPressVIPMinimum/Sniffs/Hooks/PreGetPostsSniff.php on line 314
I'm not sure what is causing this. The linting seems to still continue and the file is error heavy. But I was curious if there was any insight into why this is happening. 🤷🏾♀️
Error Code
Internal.Exception
Environment
Use
php -v
andcomposer show
to get versions.Tested Against
master
branch?master
branch of VIPCS.develop
branch of VIPCS.The text was updated successfully, but these errors were encountered: