WordPress.org

Make WordPress Core

Changeset 25779


Ignore:
Timestamp:
10/14/2013 09:54:33 PM (5 years ago)
Author:
dd32
Message:

Remove PHP4 compat code from the ZipArchive unzip handler, and pass the failure reason into the WP_Error return.

See #22704

File:
1 edited

Legend:

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

    r25776 r25779  
    597597    $z = new ZipArchive();
    598598
    599     // PHP4-compat - php4 classes can't contain constants
    600     $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4);
     599    $zopen = $z->open( $file, ZIPARCHIVE::CHECKCONS );
    601600    if ( true !== $zopen )
    602         return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
     601        return new WP_Error( 'incompatible_archive', __( 'Incompatible Archive.' ), array( 'ziparchive_error' => $zopen ) );
    603602
    604603    $uncompressed_size = 0;
Note: See TracChangeset for help on using the changeset viewer.