• Hi.

    This plugin displays two errors on backend:

    Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /wp-includes/functions.php on line 7053
    
    Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /wp-includes/functions.php on line 2165

    Do you know how to resolve this?

    Regards.

Viewing 1 replies (of 1 total)
  • mb00

    (@mb00)

    Bump.

    The deprecated warning present in PHP8.1+. This warning is coming from passing null to add_submenu_page() method in admin/class-wp-rest-api-log-admin.php function admin_menu().

    Changing null to ” would fix the problem, but technically a parent slug should be passed as an argument.

    In addition, there is also warnings when viewing the log entry( e.g. /wp-admin/tools.php?page=wp-rest-api-log-view-entry&id=123):

    WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given

    and

    WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given

    in wp-rest-api-log/includes/class-wp-rest-api-log-request-response-base.php file lines 130 and 145.

Viewing 1 replies (of 1 total)
  • The topic ‘Deprecated functions strpos() and str_replace()’ is closed to new replies.