Make _unzip_file_ziparchive() PHP4 safe. See #10403.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f65140c7b3
commit
5128c1ccc2
|
@ -551,7 +551,9 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array()) {
|
|||
global $wp_filesystem;
|
||||
|
||||
$z = new ZipArchive();
|
||||
if ( true !== $z->open($file, ZIPARCHIVE::CHECKCONS) )
|
||||
|
||||
// PHP4-compat - php4 classes can't contain constants
|
||||
if ( true !== $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4) )
|
||||
return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
|
||||
|
||||
for ( $i = 0; $i < $z->numFiles; $i++ ) {
|
||||
|
|
Loading…
Reference in New Issue