Site Health: Correct the check for disk space available to safely perform updates.
The `wp-content/upgrade` directory does not exist initially after installation, so the Site Health check could not determine the available disk space until the directory was subsequently created during an update. By testing `WP_CONTENT_DIR` instead, the check can complete successfully. This also brings consistency with similar checks in `_unzip_file_ziparchive()` and `_unzip_file_pclzip()`. Follow-up to [55720], [56401]. Props wbdv, khokansardar, mi5t4n, SergeyBiryukov. Fixes #61602. Built from https://develop.svn.wordpress.org/trunk@58913 git-svn-id: http://core.svn.wordpress.org/trunk@58309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6c8056c2dd
commit
4b49b0d168
|
@ -1817,7 +1817,7 @@ class WP_Site_Health {
|
|||
* @return array The test results.
|
||||
*/
|
||||
public function get_test_available_updates_disk_space() {
|
||||
$available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( WP_CONTENT_DIR . '/upgrade/' ) : false;
|
||||
$available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( WP_CONTENT_DIR ) : false;
|
||||
|
||||
$result = array(
|
||||
'label' => __( 'Disk space available to safely perform updates' ),
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.7-alpha-58912';
|
||||
$wp_version = '6.7-alpha-58913';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue