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:
parent
ad5f5db861
commit
bed23730dc
|
@ -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