diff options
author | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2024-08-19 15:19:27 +0000 |
---|---|---|
committer | Sergey Biryukov <sergeybiryukov@git.wordpress.org> | 2024-08-19 15:19:27 +0000 |
commit | 04694fbf545bacadc7ff733b1465524f9934864e (patch) | |
tree | 589d358d299f444adc78e6c4c29baa977d25e143 /src | |
parent | be4fe649e58bb578785c888a80a0d14faaffb5e4 (diff) | |
download | wordpress-04694fbf545bacadc7ff733b1465524f9934864e.tar.gz wordpress-04694fbf545bacadc7ff733b1465524f9934864e.zip |
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.
git-svn-id: https://develop.svn.wordpress.org/trunk@58913 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'src')
-rw-r--r-- | src/wp-admin/includes/class-wp-site-health.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php index cd6fb0d7db..b35c595c3c 100644 --- a/src/wp-admin/includes/class-wp-site-health.php +++ b/src/wp-admin/includes/class-wp-site-health.php @@ -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' ), |