Skip to content

Conversation

@roborourke
Copy link

@roborourke roborourke commented Dec 11, 2025

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 foreach loops to preserve the $file variable passed to the filter.

Trac ticket: https://core.trac.wordpress.org/ticket/64398


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

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()`
@github-actions
Copy link

github-actions bot commented Dec 11, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props sanchothefat, westonruter.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@westonruter
Copy link
Member

@roborourke looks like the changes broke a related unit test.

// Extract the files from the zip.
foreach ( $archive_files as $file ) {
foreach ( $archive_files as $archive_file ) {
if ( $file['folder'] ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if ( $file['folder'] ) {
if ( $archive_file['folder'] ) {

Missing instance of old variable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh whoops! Good spot

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(See comments)

@github-actions
Copy link

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 61374
GitHub commit: a8630eb

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions bot closed this Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants