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

git-svn-id: https://develop.svn.wordpress.org/trunk@17693 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2011-04-23 14:30:44 +00:00
parent 0722876118
commit 48ac6604b0
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) )