Always fallback to PclZip in the event that ZipArchive does not return true. The PHP Zip extension is hit-and-miss with OSX generated zip files, sometimes 0 will be emitted and extraction will succeed, others it will fail with. Reverts r14346, r14377, partially r14800. See #12637. See #13491

git-svn-id: http://svn.automattic.com/wordpress/trunk@15052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-05-29 13:16:35 +00:00
parent 83d71541cf
commit 92eeafce24
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
// PHP4-compat - php4 classes can't contain constants
$zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4);
if ( true !== $zopen && /* ZIPARCHIVE::ZIP_ER_OK */ 0 !== $zopen ) // may return true, or (int)0 ZIP_ER_OK under certain versions
if ( true !== $zopen )
return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
for ( $i = 0; $i < $z->numFiles; $i++ ) {