WordPress.org

Make WordPress Core

Changeset 14346


Ignore:
Timestamp:
05/02/2010 10:25:30 PM (8 years ago)
Author:
dd32
Message:

Check for "ZIP_ER_OK" return value on ZipArchive. See #12637

File:
1 edited

Legend:

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

    r14016 r14346  
    577577
    578578    // PHP4-compat - php4 classes can't contain constants
    579     if ( true !== $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4) )
     579    $zopen = $z->open($file, /* ZIPARCHIVE::CHECKCONS */ 4);
     580    if ( true !== $zopen || ZIP_ER_OK !== $zopen ) // may return true, or (int)0 ZIP_ER_OK under certain versions
    580581        return new WP_Error('incompatible_archive', __('Incompatible Archive.'));
    581582
Note: See TracChangeset for help on using the changeset viewer.