Check to see if mbstring.func_overload is configured to affect string functions before switching charsets. Props SergeyBiryukov. Fixes #25063

git-svn-id: https://develop.svn.wordpress.org/trunk@25056 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-08-20 06:23:48 +00:00
parent 114974f156
commit e4361d8f96
1 changed files with 1 additions and 1 deletions

View File

@ -667,7 +667,7 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
global $wp_filesystem;
// See #15789 - PclZip uses string functions on binary data, If it's overloaded with Multibyte safe functions the results are incorrect.
if ( ini_get('mbstring.func_overload') && function_exists('mb_internal_encoding') ) {
if ( ( ini_get('mbstring.func_overload') & 2 ) && function_exists('mb_internal_encoding') ) {
$previous_encoding = mb_internal_encoding();
mb_internal_encoding('ISO-8859-1');
}