From 79bb63a4e063e5ffbe58787a2ac0d01097ca920e Mon Sep 17 00:00:00 2001 From: dd32 Date: Mon, 3 May 2010 18:44:34 +0000 Subject: [PATCH] Fix ZIP_ER_OK constant, Its a class constant, and only accessible as such under PHP5. Props sivel for noticing. Fixes #12637 git-svn-id: http://svn.automattic.com/wordpress/trunk@14377 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/file.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index f0f5dc4c78..aa50666b24 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -577,7 +577,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 || ZIP_ER_OK !== $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++ ) {