- Timestamp:
- 04/04/2024 07:28:21 PM (15 months ago)
- Location:
- branches/6.4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.4
-
branches/6.4/src/wp-admin/includes/class-file-upload-upgrader.php
r57390 r57929 71 71 72 72 if ( 'pluginzip' === $form || 'themezip' === $form ) { 73 $archive_is_valid = false; 74 75 /** This filter is documented in wp-admin/includes/file.php */ 76 if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { 77 $archive = new ZipArchive(); 78 $archive_is_valid = $archive->open( $file['file'], ZIPARCHIVE::CHECKCONS ); 79 80 if ( true === $archive_is_valid ) { 81 $archive->close(); 82 } 83 } else { 84 require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; 85 86 $archive = new PclZip( $file['file'] ); 87 $archive_is_valid = is_array( $archive->properties() ); 88 } 89 90 if ( true !== $archive_is_valid ) { 73 if ( ! wp_zip_file_is_valid( $file['file'] ) ) { 91 74 wp_delete_file( $file['file'] ); 92 75 wp_die( __( 'Incompatible Archive.' ) );
Note: See TracChangeset
for help on using the changeset viewer.