WordPress / WordPress/plugin-check

Plugin check warning report should not Include global variable warning for a variable defined inside loop.

Open
#1,311 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
362
Forks
126
Avg merge
1d 23h
Merged PRs (30d)
22

Description

I am scanning my plugin with Plugin Check and as my warning report turned on my whole page is bloated with reports showing global variable without prefix. inside a loop a variable should not cause conflict. and I don't think using $i for index or $key in foreach loop is not a crime.

Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the warning in Plugin Check with a variable such as $i or $key defined inside a loop, then trace which warning source reports it. Done means loop-local index and foreach variables no longer produce global-variable warnings while other relevant warnings remain reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.