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: https://develop.svn.wordpress.org/trunk@14377 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a45b583463
commit
54c97bf8d1
|
@ -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++ ) {
|
||||
|
|
Loading…
Reference in New Issue