mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Site Health: Display a correct error message for a failing request in wp_version_check()
test.
Props Clorith, axaak. Fixes #46814. Built from https://develop.svn.wordpress.org/trunk@45118 git-svn-id: http://core.svn.wordpress.org/trunk@44927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5754da106b
commit
a431028795
@ -106,6 +106,17 @@ class WP_Site_Health_Auto_Updates {
|
||||
|
||||
$test = wp_remote_get( $url, compact( 'cookies', 'headers', 'timeout' ) );
|
||||
|
||||
if ( is_wp_error( $test ) ) {
|
||||
return array(
|
||||
'description' => sprintf(
|
||||
/* translators: %s: Name of the filter used. */
|
||||
__( 'Could not confirm that the %s filter is available.' ),
|
||||
'<code>wp_version_check()</code>'
|
||||
),
|
||||
'severity' => 'warning',
|
||||
);
|
||||
}
|
||||
|
||||
$response = wp_remote_retrieve_body( $test );
|
||||
|
||||
if ( 'yes' !== $response ) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.2-beta1-45117';
|
||||
$wp_version = '5.2-beta1-45118';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user