mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-25 02:27:50 +01:00
Site Health: Ensure that the tests returned by WP_Site_Health::get_tests()
always have the required array keys: direct
and async
.
This avoids PHP notices if these keys were accidentally removed using the `site_status_tests` filter. Props khag7, Ov3rfly, desrosj, Clorith. Merges [48808] to the 5.5 branch. Fixes #50858. Built from https://develop.svn.wordpress.org/branches/5.5@48810 git-svn-id: http://core.svn.wordpress.org/branches/5.5@48572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2867dadfa7
commit
f6dfc217e7
@ -2207,6 +2207,15 @@ class WP_Site_Health {
|
||||
*/
|
||||
$tests = apply_filters( 'site_status_tests', $tests );
|
||||
|
||||
// Ensure that the filtered tests contain the required array keys.
|
||||
$tests = array_merge(
|
||||
array(
|
||||
'direct' => array(),
|
||||
'async' => array(),
|
||||
),
|
||||
$tests
|
||||
);
|
||||
|
||||
return $tests;
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '5.5.1-alpha-48807';
|
||||
$wp_version = '5.5.1-alpha-48810';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user