#64398 closed defect (bug) (fixed)
`pre_unzip_file` and `unzip_file` filters in `_unzip_file_pclzip()` do not function as documented
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 7.0 | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Filesystem API | Keywords: | has-patch changes-requested |
| Focuses: | Cc: |
Description
The filters in _unzip_file_pclzip() have a bug, caused by the use of the variable name $file in 2 foreach loops within the function that overwrite the original argument passed to the function.
Change History (6)
This ticket was mentioned in PR #10618 on WordPress/wordpress-develop by @sanchothefat.
5 months ago
#1
- Keywords has-patch added
@westonruter commented on PR #10618:
5 months ago
#2
@roborourke looks like the changes broke a related unit test.
Note: See
TracTickets for help on using
tickets.
The foreach loops set the $file variable, overriding the one passed into the function on each iteration, so the filter does not work as documented for
_unzip_file_pclzip()Uses a different variable name in the
foreachloops to preserve the$filevariable passed to the filter.Trac ticket: [](https://core.trac.wordpress.org/ticket/64398)