-
Notifications
You must be signed in to change notification settings - Fork 877
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
strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated #21435
Comments
Hi @kkmuffme Thanks for using the Yoast SEO plugin and for creating the issue. I tried reproducing the issue by installing the Storefront theme, Yoast SEO 22.9. However, I could not notice the error you mentioned when I tried to access the Import product page within the Tools > Import > WooCommerce products (CSV). I also noticed that the import URL on my lab site is We look forward to hearing from you. |
Hi possibly. In any case, this is purely a type/static analysis issue and doesn't need a reproducer. Trying to get a reproducer takes more time than to actually create a PR and fix this, so I don't think it's time well spent. |
Hi @kkmuffme We want to reproduce the issue before escalating it to the appropriate team, as line 127 within the file https://github.com/Yoast/wordpress-seo/blob/trunk/src/helpers/first-time-configuration-notice-helper.php#L127 is to check whether the page is a Yoast SEO admin page. If you are interested in contributing to our plugin, please send a PR - see more info here: https://github.com/Yoast/wordpress-seo/blob/trunk/.github/CONTRIBUTING.md |
Please give us a description of what happened
wordpress-seo/src/helpers/first-time-configuration-notice-helper.php (line 127)
To Reproduce
Step-by-step reproduction instructions
Expected results
Actual results
filter_input
will return null|false if the GET parameter is not set or in PHP CLI (even if it's set).Possibly use static analysis tools like psalm to prevent errors like those in the future
Used versions
The text was updated successfully, but these errors were encountered: