Changeset 17592
- Timestamp:
- 04/03/2011 12:32:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/file.php
r17576 r17592 653 653 global $wp_filesystem; 654 654 655 // See #15789 - PclZip uses string functions on binary data, If it's overloaded with Multibyte safe functions the results are incorrect. 656 if ( ini_get('mbstring.func_overload') && function_exists('mb_internal_encoding') ) { 657 $previous_encoding = mb_internal_encoding(); 658 mb_internal_encoding('ISO-8859-1'); 659 } 660 655 661 require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php'); 656 662 657 663 $archive = new PclZip($file); 658 664 665 $archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING); 666 667 if ( isset($previous_encoding) ) 668 mb_internal_encoding($previous_encoding); 669 659 670 // Is the archive valid? 660 if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)))671 if ( false === $archive_files ) 661 672 return new WP_Error('incompatible_archive', __('Incompatible Archive.'), $archive->errorInfo(true)); 662 673
Note: See TracChangeset
for help on using the changeset viewer.