diff --git a/wp-admin/includes/class-wp-site-health.php b/wp-admin/includes/class-wp-site-health.php index c2f10fa72d..a745a09dd7 100644 --- a/wp-admin/includes/class-wp-site-health.php +++ b/wp-admin/includes/class-wp-site-health.php @@ -2176,16 +2176,30 @@ class WP_Site_Health { 'post_max_size', 'upload_max_filesize' ); - $result['status'] = 'recommended'; - $result['description'] = sprintf( - '

%s

', - sprintf( - /* translators: 1: post_max_size, 2: upload_max_filesize */ - __( 'The setting for %1$s is smaller than %2$s, this could cause some problems when trying to upload files.' ), - 'post_max_size', - 'upload_max_filesize' - ) - ); + $result['status'] = 'recommended'; + + if ( 0 === wp_convert_hr_to_bytes( $post_max_size ) ) { + $result['description'] = sprintf( + '

%s

', + sprintf( + /* translators: 1: post_max_size, 2: upload_max_filesize */ + __( 'The setting for %1$s is currently configured as 0, this could cause some problems when trying to upload files through plugin or theme features that rely on various upload methods. It is recommended to configure this setting to a fixed value, ideally matching the value of %2$s, as some upload methods read the value 0 as either unlimited, or disabled.' ), + 'post_max_size', + 'upload_max_filesize' + ) + ); + } else { + $result['description'] = sprintf( + '

%s

', + sprintf( + /* translators: 1: post_max_size, 2: upload_max_filesize */ + __( 'The setting for %1$s is smaller than %2$s, this could cause some problems when trying to upload files.' ), + 'post_max_size', + 'upload_max_filesize' + ) + ); + } + return $result; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 0568066075..0b74af97b3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.7-beta1-50262'; +$wp_version = '5.7-beta1-50263'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.