10up / safe-redirect-manager

A simple HTTP redirection plugin for WordPress.
https://wordpress.org/plugins/safe-redirect-manager
GNU General Public License v2.0
314 stars 82 forks source link

PHP warning when using wp cli command #377

Closed planetahuevo closed 6 months ago

planetahuevo commented 7 months ago

Describe the bug

When using wp safe-redirect-manager list On php 8.1 WordPress install I am getting this multiple times:

PHP Warning:  SRM_WP_CLI::{closure}(): Argument #1 ($item) must be passed by reference, value given in  .../wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-wp-cli.php on line 69              
Warning: SRM_WP_CLI::{closure}(): Argument #1 ($item) must be passed by reference, value given in .../wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-wp-cli.php on line 69

The list works fine.

Steps to Reproduce

Execute wp safe-redirect-manager list on the site

Screenshots, screen recording, code snippet

PHP Warning:  SRM_WP_CLI::{closure}(): Argument #1 ($item) must be passed by reference, value given in  .../wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-wp-cli.php on line 69      
Warning: SRM_WP_CLI::{closure}(): Argument #1 ($item) must be passed by reference, value given in .../wp-content/plugins/safe-redirect-manager/inc/classes/class-srm-wp-cli.php on line 69

Environment information

OS: Linux 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64 Shell: /bin/bash PHP binary: /usr/bin/php8.1 PHP version: 8.1.26 php.ini used: /etc/php/8.1/cli/php.ini MySQL binary: /usr/bin/mysql MySQL version: mysql Ver 8.0.35-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu)) SQL modes: WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli WP-CLI vendor dir: phar://wp-cli.phar/vendor WP_CLI phar path: /.../public WP-CLI packages dir: WP-CLI cache dir: /.../.wp-cli/cache WP-CLI global config: WP-CLI project config: WP-CLI version: 2.9.0

WordPress information

No response

Code of Conduct