Open kkmuffme opened 3 weeks ago
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 /wp-admin/edit.php?post_type=product&page=product_importer
instead of the one you mentioned /wp-admin/admin.php?import=woocommerce_product_csv
. So, please let us know whether you are using any plugins for importing the WooCommerce Product import other than the one provided by WooCommerce by default.
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 futureUsed versions