• When used with PHP 8.3 plugin triggers following warnings:
    Warning: WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given in /wp-content/plugins/wp-rest-api-log/includes/class-wp-rest-api-log-request-response-base.php on line 140

    Warning: WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given in /wp-content/plugins/wp-rest-api-log/includes/class-wp-rest-api-log-request-response-base.php on line 125

    Deprecated: Creation of dynamic property WP_REST_API_Log_Entry::$source is deprecated in /wp-content/plugins/wp-rest-api-log/includes/class-wp-rest-api-log-entry.php on line 146

    I also started to see these notices in my log after activating the plugin (I am not 100% sure they are related to your plugin but most likely it is so as they are thrown at the same time as warnings and notices related to your plugin):

    Deprecated: strip_tags(): Passing null to parameter #1 ($string) of type string is deprecated in /wp-admin/admin-header.php on line 36

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

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

Viewing 1 replies (of 1 total)
  • Warning: WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given in /wp-content/plugins/wp-rest-api-log/includes/class-wp-rest-api-log-request-response-base.php on line 140

    Warning: WP_REST_API_Log_API_Request_Response_Base::{closure}(): Argument #2 ($k) must be passed by reference, value given in /wp-content/plugins/wp-rest-api-log/includes/class-wp-rest-api-log-request-response-base.php on line 125

    are related to how is used array_walk_recursive().

    In anonymous function (closure), are declared both $v and $k as passed by reference:
    function ( &$v, &$k ) { ... }

    However, array_walk_recursive() only allows the first argument (value) to be passed by reference. The second argument (key) must not be passed by reference.

Viewing 1 replies (of 1 total)

The topic ‘Plugin triggers some warning on PHP 8.3’ is closed to new replies.