• Resolved nettlraj

    (@nettlraj)


    Great plugin, and works well for my needs!

    I have some warnings appearing in my debug.log file which only appear when this plugin is active. The warnings are:

    PHP Deprecated:  strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/htdocs/wp-includes/functions.php on line 7053

    PHP Deprecated:  str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/htdocs/wp-includes/functions.php on line 2165

    Can these be fixed please?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Mykola Lukin

    (@bycrik)

    Hello @nettlraj ,

    Would you please share the whole backtrace of the error so we can understand what part of the plugin can trigger these warnings?

    Thanks!

    Thread Starter nettlraj

    (@nettlraj)

    Hi. I’m not sure how to do that. These are the only two lines that keep appearing in the debug.log file. There are no other lines in the file.

    Plugin Author Mykola Lukin

    (@bycrik)

    Hello @nettlraj,

    It looks like the issue is triggered in one of WordPress’s core files: wp-includes/functions.php. However, as plugins use the core files, they also can invoke them incorrectly.

    Can you please clarify your WordPress/WooCommerce/tiered pricing version?

    Thread Starter nettlraj

    (@nettlraj)

    Sure.

    WordPress: 6.3
    WooCommerce: 8.0.1
    Tiered Pricing Table: 3.5.1
    PHP: 8.1

    Plugin Author Mykola Lukin

    (@bycrik)

    Hey @nettlraj,

    Thanks for clarifying!

    It looks like PHP 8.1 is now throwing warnings for parameters that were valid on older versions.

    We will take this in mind for the next plugin update.

    Thanks!

    Thread Starter nettlraj

    (@nettlraj)

    Ah that makes sense. Great! Thanks! Great plugin BTW!

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

The topic ‘PHP Deprecated Warnings appearing in debug.log’ is closed to new replies.