-
Dear Rank Math Support Team,
I hope this message finds you well.
I am experiencing a deprecated notice in my WordPress site related to the Rank Math SEO plugin’s WooCommerce module. The issue arises with the strpos() function when passing null as an argument, which is deprecated in PHP 8.1 and later versions. Here are the details from my error log:
vbnet
Kodu kopyala
[04-Aug-2024 16:50:37 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 130
[04-Aug-2024 16:50:37 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-content/plugins/seo-by-rank-math/includes/modules/woocommerce/class-woocommerce.php on line 135
To temporarily address this issue, I have modified the class-woocommerce.php file to ensure that the variables passed to strpos() are not null. However, I believe this should be handled in the official plugin code to ensure compatibility with PHP 8.1 and future versions.Could you please look into this issue and provide an update or a patch to fix it?
Thank you for your attention to this matter. I look forward to your response.
Best regards,
Selçuk Göktekin
The ticket ‘Deprecated Notice in WooCommerce Module – PHP 8.1 Compatibility’ is closed to new replies.