Site Health: Avoid a PHP notice in `WP_Site_Health::wp_cron_scheduled_check()` if async test response does not contain the expected result.
Additionally, avoid a PHP notice in `::get_test_php_version()` if the minimum recommended version of PHP could not be determined. Props schlessera, oakesjosh. Fixes #49943. Built from https://develop.svn.wordpress.org/trunk@47628 git-svn-id: http://core.svn.wordpress.org/trunk@47403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
352cb55cca
commit
5371e3fd62
|
@ -719,7 +719,7 @@ class WP_Site_Health {
|
|||
sprintf(
|
||||
/* translators: %s: The minimum recommended PHP version. */
|
||||
__( 'PHP is the programming language used to build and maintain WordPress. Newer versions of PHP are faster and more secure, so staying up to date will help your site’s overall performance and security. The minimum recommended version of PHP is %s.' ),
|
||||
$response['recommended_version']
|
||||
$response ? $response['recommended_version'] : ''
|
||||
)
|
||||
),
|
||||
'actions' => sprintf(
|
||||
|
@ -2334,7 +2334,13 @@ class WP_Site_Health {
|
|||
}
|
||||
|
||||
if ( ! is_wp_error( $result_fetch ) ) {
|
||||
$results[] = json_decode( wp_remote_retrieve_body( $result_fetch ) );
|
||||
$result = json_decode( wp_remote_retrieve_body( $result_fetch ), true );
|
||||
} else {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
if ( is_array( $result ) ) {
|
||||
$results[] = $result;
|
||||
} else {
|
||||
$results[] = array(
|
||||
'status' => 'recommended',
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5-alpha-47627';
|
||||
$wp_version = '5.5-alpha-47628';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue