• Resolved W★

    (@filmpuls)


    Query Monitor shows (latest update):
    strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated

    wp-content/plugins/autoptimize/classes/autoptimizeExtra.php:118 public function filter_remove_qs( $src ) { if ( strpos( $src, '?ver=' ) ) { $src = remove_query_arg( 'ver', $src ); } elseif ( strpos( $src, '?v=' ) ) { $src = remove_query_arg( 'v', $src ); } return $src; }

    • This topic was modified 1 year ago by W★.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    not sure under which circumstances $src would be null, but changing that into

    public function filter_remove_qs( $src )
        {
            if ( ! empty( $src ) ) {
                if ( strpos( $src, '?ver=' ) ) {
                    $src = remove_query_arg( 'ver', $src );
                } elseif ( strpos( $src, '?v=' ) ) {
                    $src = remove_query_arg( 'v', $src );
                }
            }
    
            return $src;
        }

    should do the trick, I’ll push this into the beta version ??

    thanks for reporting,
    frank

    Thread Starter W★

    (@filmpuls)

    ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP 8.1. compatiblity issue?’ is closed to new replies.