Automattic / Automattic/wp-memcached

Deprecated notice: `Using null as an array offset is deprecated, use an empty string instead`

Open Beginner friendly
#182 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
172
Forks
52
PR merge metrics
No merged PRs in 30d

Description

Our sites live on VIP environments, and the logs are cluttered with zillions of deprecation notices about a null array offset on `wp-memcached/includes/stats.php:87`. It makes it hard to see anything else in the logs. It would be great if someone could address this in an upcoming release of `wp-memcached`!

Example:

```
PHP message: Deprecated: Using null as an array offset is deprecated, use an empty string instead in /var/www/wp-content/mu-plugins/drop-ins/wp-memcached/includes/stats.php on line 87 [...-develop.go-vip.net] [wp-content/mu-plugins/drop-ins/wp-memcached/includes/wp-object-cache.php:1098 Automattic\Memcached\Stats->group_ops_stats(), wp-content/mu-plugins/drop-ins/wp-memcached/includes/wp-object-cache.php:175 WP_Object_Cache->group_ops_stats(), wp-content/mu-plugins/drop-ins/wp-memcached/object-cache.php:57 WP_Object_Cache->add(), wp-content/mu-plugins/cron/cron-control/includes/class-lock.php:96 wp_cache_add(), wp-content/mu-plugins/cron/cron-control/includes/class-events.php:46 Automattic\WP\Cron_Control\Lock::prime_lock(), wp-content/mu-plugins/cron/cron-control/includes/class-singleton.php:32 Automattic\WP\Cron_Control\Events->class_init(), wp-content/mu-plugins/cron/cron-control/includes/class-main.php:87 Automattic\WP\Cron_Control\Singleton::instance(), wp-content/mu-plugins/cron/cron-control/includes/class-main.php:24 Automattic\WP\Cron_Control\Main->load_plugin_classes(), wp-content/mu-plugins/cron/cron-control/includes/class-singleton.php:32 Automattic\WP\Cron_Control\Main->class_init(), wp-content/mu-plugins/cron/cron-control/cron-control.php:23 Automattic\WP\Cron_Control\Singleton::instance(), wp-content/mu-plugins/001-cron.php:126 require_once('wp-content/mu-plugins/cron/cron-control/cron-control.php'), wp-settings.php:500 include_once('wp-content/mu-plugins/001-cron.php'), /usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1374 require('wp-settings.php'), /usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php:1293 WP_CLI\Runner->load_wordpress(), /usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php:28 WP_CLI\Runner->start(), /usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php:84 WP_CLI\Bootstrap\LaunchRunner->process(), /usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php:35 WP_CLI\bootstrap(), /var/wpvip/fpm-cron-runner.php:80 require_once('/usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php')]
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading wp-memcached/includes/stats.php around line 87, then trace the stats call from wp-memcached/includes/wp-object-cache.php as shown in the log. Reproduce or inspect the affected stats path and confirm that the deprecation notice no longer appears when it runs.

Written by the indexing model from the issue text.

Assessment

Tech stack
memcached, php, wordpress
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.