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

Built from https://develop.svn.wordpress.org/trunk@25056


git-svn-id: http://core.svn.wordpress.org/trunk@25042 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2013-08-20 06:24:09 +00:00
parent 47c82e1c83
commit ad980384f2
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; global $wp_filesystem;
// See #15789 - PclZip uses string functions on binary data, If it's overloaded with Multibyte safe functions the results are incorrect. // 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(); $previous_encoding = mb_internal_encoding();
mb_internal_encoding('ISO-8859-1'); mb_internal_encoding('ISO-8859-1');
} }