• Resolved prwordpressorg

    (@prwordpressorg)


    Would anyone please know what is causing this message in the debug file of my WordPress installation:

    PHP Deprecated: strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /www.mydomain.com/www/wp-content/plugins/woocommerce/includes/wc-page-functions.php on line 139

    Line 139 of the wc-page-functions.php file then is

    if ( strstr( $path, $customer_logout ) || strstr( $query, $customer_logout ) ) {

    The PHP Deprecated line keeps being added every few seconds, I have thousands of them.

    I am running PHP 8.1.18. All my plugins and WP core are the latest and up to date.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Can you please let me know what were the steps made on the site in order to receive that error? I mean, was the error present after an update? Please provide us with more details.

    I can see similar case reported to the developers in GitHub, please check here.

    Can you try to update the version of PHP on your site to see if that makes a difference (For example, PHP 8.2)? Please note, before making any change be sure to back up your site, or you can create a staging site via WP Staging, that way you can test without affecting the live site.

    Let us know how that goes.

    Soccerwidow

    (@soccerwidow)

    Hi, I’ve just had the same error after an automated upgrade to php version 8.1.

    Moving the version back to 8.0 removed that error.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘PHP Deprecated error by wc-page-functions’ is closed to new replies.