Make WordPress Core

Changeset 13015


Ignore:
Timestamp:
02/07/2010 09:28:05 PM (15 years ago)
Author:
westi
Message:

Make _unzip_file_ziparchive() PHP4 safe. See #10403.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/file.php

    r13007 r13015  
    548548 * @return mixed WP_Error on failure, True on success
    549549 */
    550 function _unzip_file_ziparchive($file, $to, $needed_dirs = array()) {
     550function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) {
    551551    global $wp_filesystem;
    552552
    553553    $z = new ZipArchive();
    554     if ( true !== $z->open($file, ZIPARCHIVE::CHECKCONS) )
     554
     555    // PHP4-compat - php4 classes can't contain constants
     556    if ( true !== $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4) )
    555557        return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
    556558
Note: See TracChangeset for help on using the changeset viewer.