Index: /trunk/src/wp-admin/includes/file.php
===================================================================
--- /trunk/src/wp-admin/includes/file.php	(revision 61373)
+++ /trunk/src/wp-admin/includes/file.php	(revision 61374)
@@ -1897,12 +1897,12 @@
 
 	// Determine any children directories needed (From within the archive).
-	foreach ( $archive_files as $file ) {
-		if ( str_starts_with( $file['filename'], '__MACOSX/' ) ) { // Skip the OS X-created __MACOSX directory.
+	foreach ( $archive_files as $archive_file ) {
+		if ( str_starts_with( $archive_file['filename'], '__MACOSX/' ) ) { // Skip the OS X-created __MACOSX directory.
 			continue;
 		}
 
-		$uncompressed_size += $file['size'];
-
-		$needed_dirs[] = $to . untrailingslashit( $file['folder'] ? $file['filename'] : dirname( $file['filename'] ) );
+		$uncompressed_size += $archive_file['size'];
+
+		$needed_dirs[] = $to . untrailingslashit( $archive_file['folder'] ? $archive_file['filename'] : dirname( $archive_file['filename'] ) );
 	}
 
@@ -1968,20 +1968,20 @@
 
 	// Extract the files from the zip.
-	foreach ( $archive_files as $file ) {
-		if ( $file['folder'] ) {
+	foreach ( $archive_files as $archive_file ) {
+		if ( $archive_file['folder'] ) {
 			continue;
 		}
-
-		if ( str_starts_with( $file['filename'], '__MACOSX/' ) ) { // Don't extract the OS X-created __MACOSX directory files.
+	
+		if ( str_starts_with( $archive_file['filename'], '__MACOSX/' ) ) { // Don't extract the OS X-created __MACOSX directory files.
 			continue;
 		}
 
 		// Don't extract invalid files:
-		if ( 0 !== validate_file( $file['filename'] ) ) {
+		if ( 0 !== validate_file( $archive_file['filename'] ) ) {
 			continue;
 		}
 
-		if ( ! $wp_filesystem->put_contents( $to . $file['filename'], $file['content'], FS_CHMOD_FILE ) ) {
-			return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $file['filename'] );
+		if ( ! $wp_filesystem->put_contents( $to . $archive_file['filename'], $archive_file['content'], FS_CHMOD_FILE ) ) {
+			return new WP_Error( 'copy_failed_pclzip', __( 'Could not copy file.' ), $archive_file['filename'] );
 		}
 	}
Index: /trunk/tests/phpunit/tests/filesystem/unzipFilePclzip.php
===================================================================
--- /trunk/tests/phpunit/tests/filesystem/unzipFilePclzip.php	(revision 61373)
+++ /trunk/tests/phpunit/tests/filesystem/unzipFilePclzip.php	(revision 61374)
@@ -38,5 +38,5 @@
 	public function test_should_apply_pre_unzip_file_filters() {
 		$filter = new MockAction();
-		add_filter( 'pre_unzip_file', array( $filter, 'filter' ) );
+		add_filter( 'pre_unzip_file', array( $filter, 'filter' ), 10, 2 );
 
 		// Prepare test environment.
@@ -54,5 +54,6 @@
 		$this->delete_folders( $unzip_destination );
 
-		$this->assertSame( 1, $filter->get_call_count() );
+		$this->assertSame( 1, $filter->get_call_count(), 'The filter should be called once.' );
+		$this->assertSame( self::$test_data_dir . 'archive.zip', $filter->get_args()[0][1], 'The $file parameter should be correct.' );
 	}
 
@@ -64,5 +65,5 @@
 	public function test_should_apply_unzip_file_filters() {
 		$filter = new MockAction();
-		add_filter( 'unzip_file', array( $filter, 'filter' ) );
+		add_filter( 'unzip_file', array( $filter, 'filter' ), 10, 2 );
 
 		// Prepare test environment.
@@ -80,5 +81,6 @@
 		$this->delete_folders( $unzip_destination );
 
-		$this->assertSame( 1, $filter->get_call_count() );
+		$this->assertSame( 1, $filter->get_call_count(), 'The filter should be called once.' );
+		$this->assertSame( self::$test_data_dir . 'archive.zip', $filter->get_args()[0][1], 'The $file parameter should be correct.' );
 	}
 }
