- Timestamp:
- 01/30/2024 03:13:55 PM (17 months ago)
- Location:
- branches/4.2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.2
- Property svn:mergeinfo changed
/trunk merged: 57388-57389
- Property svn:mergeinfo changed
-
branches/4.2/src/wp-admin/includes/class-wp-upgrader.php
r38529 r57413 2297 2297 if ( isset( $file['error'] ) ) 2298 2298 wp_die( $file['error'] ); 2299 2300 if ( 'pluginzip' === $form || 'themezip' === $form ) { 2301 $archive_is_valid = false; 2302 2303 /** This filter is documented in wp-admin/includes/file.php */ 2304 if ( class_exists( 'ZipArchive', false ) && apply_filters( 'unzip_file_use_ziparchive', true ) ) { 2305 $archive = new ZipArchive(); 2306 $archive_is_valid = $archive->open( $file['file'], ZIPARCHIVE::CHECKCONS ); 2307 2308 if ( true === $archive_is_valid ) { 2309 $archive->close(); 2310 } 2311 } else { 2312 require_once ABSPATH . 'wp-admin/includes/class-pclzip.php'; 2313 2314 $archive = new PclZip( $file['file'] ); 2315 $archive_is_valid = is_array( $archive->properties() ); 2316 } 2317 2318 if ( true !== $archive_is_valid ) { 2319 wp_delete_file( $file['file'] ); 2320 wp_die( __( 'Incompatible Archive.' ) ); 2321 } 2322 } 2299 2323 2300 2324 $this->filename = $_FILES[$form]['name'];
Note: See TracChangeset
for help on using the changeset viewer.