-
Notifications
You must be signed in to change notification settings - Fork 974
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
PHP Notice: Undefined offset: 1 in /var/www/html/wp-includes/vars.php on line 31 #4291
Conversation
I realized that this problem will be seen when |
Hi @miya0001, yeah it's awkward to force PHP Notices to stderr at the moment in the tests. I think looking at <?php define( 'WP_DEBUG', true ); define( 'WP_DEBUG_DISPLAY', null ); define( 'WP_DEBUG_LOG', false ); ini_set( "error_log", '' ); ini_set( 'display_errors', 'STDERR' ); I'll push this change against this branch. The error was introduced by me in #4285 in defining |
@gitlost |
I think this hack is fairly reasonable given that it's only executed on help and that it's really a bug in core not to check that the |
If it's a core bug, can we fix it in core instead of adopting a hack we have to maintain for the long term? |
Well I say it's a core bug, but opinions could differ ("Why would it ever fail?"). Also it could take months. The original hack of defining Anyway I'll see if I can come up with a better hack than defining |
Worth opening the issue at least.
I missed this in the original review. I don't think we should define Can we remove the |
See also #674 for additional background. |
I reverted the |
loosely related trac ticket: https://core.trac.wordpress.org/ticket/41171#comment:4 |
@diggy - thanks, interesting, and confirms really that the answer to "Why would it ever fail?" is "It shouldn't". @danielbachhuber @miya0001 Howabout defining |
It's also another hack that's likely to have unintended consequences. I'm still not convinced that all of the effort in refactoring this code path (and discovering what breaks when we do) is worth solving the problem presented in #4265 |
I guess we should add a new context Because this error is a different error than what I reported, so I want to reproduce this error in a actual WordPress environment.
How about my idea? But I am sorry I will work for it tomorrow. 😄 |
Related: #4290