Make WordPress Core


Ignore:
Timestamp:
09/11/2013 08:08:35 AM (12 years ago)
Author:
dd32
Message:

Switch unzip_file() over to using the mbstring.func_override helper functions. See #25259

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r25201 r25347  
    643643    global $wp_filesystem;
    644644
    645     // See #15789 - PclZip uses string functions on binary data, If it's overloaded with Multibyte safe functions the results are incorrect.
    646     if ( ( ini_get('mbstring.func_overload') & 2 ) && function_exists('mb_internal_encoding') ) {
    647         $previous_encoding = mb_internal_encoding();
    648         mb_internal_encoding('ISO-8859-1');
    649     }
     645    mbstring_binary_safe_encoding();
    650646
    651647    require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
     
    655651    $archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING);
    656652
    657     if ( isset($previous_encoding) )
    658         mb_internal_encoding($previous_encoding);
     653    reset_mbstring_encoding();
    659654
    660655    // Is the archive valid?
Note: See TracChangeset for help on using the changeset viewer.