diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index 1fbfe39678..79e2d48103 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -1661,7 +1661,7 @@ function _unzip_file_ziparchive( $file, $to, $needed_dirs = array() ) { * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. */ if ( wp_doing_cron() ) { - $available_space = @disk_free_space( WP_CONTENT_DIR ); + $available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( WP_CONTENT_DIR ) : false; if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) { return new WP_Error( @@ -1802,7 +1802,7 @@ function _unzip_file_pclzip( $file, $to, $needed_dirs = array() ) { * Require we have enough space to unzip the file and copy its contents, with a 10% buffer. */ if ( wp_doing_cron() ) { - $available_space = @disk_free_space( WP_CONTENT_DIR ); + $available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( WP_CONTENT_DIR ) : false; if ( $available_space && ( $uncompressed_size * 2.1 ) > $available_space ) { return new WP_Error( diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 63538751ae..c150adc26f 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -1242,7 +1242,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 = function_exists( 'disk_free_space' ) ? @disk_free_space( ABSPATH ) : false; if ( $available_space && $total_size >= $available_space ) { $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 22748777da..b0c9f3d607 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.0-alpha-52584'; +$wp_version = '6.0-alpha-52585'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.