Automattic / Automattic/zoninator
Loop to fill zone details does not work
- Dominant language
- PHP
- Stars
- 86
- Forks
- 53
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/Automattic/zoninator/blob/5588e05cb7dc82dfd10cfd7141fd119425e5ea33/zoninator.php#L1219-L1221
That assignment back to `$zone` is flawed, since the variable just gets overridden on the next loop iteration, and the original `$zones` (which is returned from the function) is never updated.
See https://3v4l.org/QMZl6 as a POC.
While the fix is easy, we'll need to see what the implications are for having the `$zones` now populated with more data.
Contributor guide
Research direction
Start at zoninator.php lines 1219-1221 and reproduce the behavior using the linked 3v4l.org proof of concept. Trace how the function returns $zones, correct the loop's data flow, and verify that the returned zones contain the expected details while checking the implications of populating them with additional data.
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
- 45/100