WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/17/2013 06:39:04 PM (8 years ago)
Author:
dd32
Message:

Silence PHP warnings from disk_free_space(). disk_free_space() will produce a warning in error conditions in addition to returning false, this includes a case where the bytes free is greater than PHP_INT_MAX (which is a error condition we don't need to check).
See #25576, #22704

File:
1 edited

Legend:

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

    r25811 r25831  
    774774        // If we don't have enough free space, it isn't worth trying again.
    775775        // Unlikely to be hit due to the check in unzip_file().
    776         $available_space = disk_free_space( ABSPATH );
     776        $available_space = @disk_free_space( ABSPATH );
    777777        if ( $available_space && $total_size >= $available_space ) {
    778778            $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) );
Note: See TracChangeset for help on using the changeset viewer.