mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
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 git-svn-id: https://develop.svn.wordpress.org/trunk@25831 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -773,7 +773,7 @@ function update_core($from, $to) {
|
||||
|
||||
// If we don't have enough free space, it isn't worth trying again.
|
||||
// Unlikely to be hit due to the check in unzip_file().
|
||||
$available_space = disk_free_space( ABSPATH );
|
||||
$available_space = @disk_free_space( ABSPATH );
|
||||
if ( $available_space && $total_size >= $available_space ) {
|
||||
$result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) );
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user