Site Health: Use an integer value as a fallback in the available disk space check.
This avoids a few type problems further in the code: boolean divided by a number, or passing `false` to `size_format()` which is documented to accept integers or strings only. Follow-up to [51815]. Props TobiasBg. See #51857. Built from https://develop.svn.wordpress.org/trunk@51898 git-svn-id: http://core.svn.wordpress.org/trunk@51491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
aef14e6d1b
commit
0f2d2264b5
|
@ -1890,7 +1890,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' ) ? (int) @disk_free_space( WP_CONTENT_DIR . '/upgrade/' ) : false;
|
||||
$available_space = function_exists( 'disk_free_space' ) ? (int) @disk_free_space( WP_CONTENT_DIR . '/upgrade/' ) : 0;
|
||||
$available_space_in_mb = $available_space / MB_IN_BYTES;
|
||||
|
||||
$result = array(
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.9-alpha-51897';
|
||||
$wp_version = '5.9-alpha-51898';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue