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:
parent
0722876118
commit
48ac6604b0
@ -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) )
|
||||
|
Loading…
Reference in New Issue
Block a user