Skip to content
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

Undefined index: QUERY_STRING in /app/wp-content/plugins/wp-force-lowercase-urls/wp-force-lowercase-urls.php:38 #8

Open
fyaconiello opened this issue Sep 7, 2022 · 2 comments

Comments

@fyaconiello
Copy link

https://wordpress.org/support/topic/undefined-index-on-line-38/

^ Undefined index issue is still present topic closed 4 years ago

I only get this error when running WP_CLI commands. This is an interesting interaction as this notice will usually never bubble up. In fact with twenty-twenty-two installed, my CLI command executes correctly. The theme error handling in my case (Rareloop’s Lumberjack starter) appears to catch the errors from this plugin and interrupts execution.

[2022-09-07T00:38:32.149511+00:00] app.ERROR: ErrorException: Undefined index: QUERY_STRING in /app/wp-content/plugins/wp-force-lowercase-urls/wp-force-lowercase-urls.php:38
Stack trace:
#0 /app/wp-content/plugins/wp-force-lowercase-urls/wp-force-lowercase-urls.php(38): Rareloop\Lumberjack\Bootstrappers\RegisterExceptionHandler->handleError(8, 'Undefined index...', '/app/wp-content...', 38, Array)
#1 /app/wp-includes/class-wp-hook.php(307): WPForceLowercaseURLs::toLower('')
#2 /app/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)
#3 /app/wp-includes/plugin.php(476): WP_Hook->do_action(Array)
#4 /app/wp-settings.php(598): do_action('init')
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1317): require('/app/wp-setting...')
#6 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1235): WP_CLI\Runner->load_wordpress()
#7 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(28): WP_CLI\Runner->start()
#8 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(78): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
#9 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
#10 phar:///usr/local/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
#11 /usr/local/bin/wp(4): include('phar:///usr/loc...')
#12 {main}
@hirasso
Copy link

hirasso commented Jan 18, 2024

@fyaconiello in WP_CLI, there is no REQUEST_URI defined. @joshbuchea are you accepting PRs?

@hirasso
Copy link

hirasso commented Jan 18, 2024

I have created a Gist with all the things I needed. It includes redirects for both server side requests as well as client-side only requests (when served from a static cache plugin): https://gist.github.com/hirasso/844c6aadf4c7931751c5a3f7e338476c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants