Automattic / Automattic/qm-memcache-stats

Invalid argument supplied for foreach()

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
11
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I noticed this plugin is updated 2 years ago, I guess wordpress API change cause the following error.

> Warning: Invalid argument supplied for foreach() in \wp-content\plugins\qm-memcache-stats\classes\QM_Output_Memcache_Stats.php on line 29
>
> Warning: Invalid argument supplied for foreach() in \wp-content\plugins\qm-memcache-stats\classes\QM_Output_Memcache_Stats.php on line 36
>
> Warning: Invalid argument supplied for foreach() in \wp-content\plugins\qm-memcache-stats\classes\QM_Output_Memcache_Stats.php on line 42

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with classes/QM_Output_Memcache_Stats.php, especially the foreach statements at lines 29, 36, and 42 cited in the report. Check what values those loops receive under the current WordPress API and reproduce the warnings; done means the reported warnings no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.