• Resolved kudlav

    (@kudlav)


    The plugin generates the following PHP warnings:

    PHP Deprecated:  strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1769
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @kudlav thank you for reporting the issue!

    We’ve noted it here and would fix it in an upcoming version.

    Having this same issue.

    Resolved in my own project by changing the reported line from

        if ( strstr( $uri, $u ) ) {

    to

        if ( strstr( $uri ?: '', $u ) ) {

    Maybe not the tidiest solution, but replaces any ‘null’ instance with a string as desired.

    There’s a fix for this in the beta versions of the plugin and it will be fixed in the next release, hopefully soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Compatibility with PHP 8.1’ is closed to new replies.