From d0a1400321c43751f04359fe86a05c0acf8e2b80 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Sat, 22 May 2010 05:09:08 +0000 Subject: [PATCH] Correct the ZipArchive opening test logic. See #13491 git-svn-id: https://develop.svn.wordpress.org/trunk@14800 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/file.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index c8156c6938..3a34a7516d 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -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 && /* ZIPARCHIVE::ZIP_ER_OK */ 0 !== $zopen ) // may return true, or (int)0 ZIP_ER_OK under certain versions return new WP_Error('incompatible_archive', __('Incompatible Archive.')); for ( $i = 0; $i < $z->numFiles; $i++ ) { @@ -1004,4 +1004,4 @@ foreach ( (array) $extra_fields as $field ) { return false; } -?> +?> \ No newline at end of file