From e4361d8f96b254eac6e23c2c656508168f908290 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Tue, 20 Aug 2013 06:23:48 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/file.php b/src/wp-admin/includes/file.php index ca424264bc..8f88de48e9 100644 --- a/src/wp-admin/includes/file.php +++ b/src/wp-admin/includes/file.php @@ -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'); }