Handle zip error's in PclZip better. PclZip::extract() returns an array on success, 0 on failure. Fixes #17224

git-svn-id: http://svn.automattic.com/wordpress/trunk@17693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2011-04-23 14:30:44 +00:00
parent ad5f5db861
commit bed23730dc
1 changed files with 1 additions and 1 deletions

View File

@ -668,7 +668,7 @@ function _unzip_file_pclzip($file, $to, $needed_dirs = array()) {
mb_internal_encoding($previous_encoding);
// Is the archive valid?
if ( false === $archive_files )
if ( !is_array($archive_files) )
return new WP_Error('incompatible_archive', __('Incompatible Archive.'), $archive->errorInfo(true));
if ( 0 == count($archive_files) )