Site Health: Check plugin data in WP_Recovery_Mode_Email_Service::get_debug().

This resolves a PHP warning when preparing debug information for the fatal error protection email if `::get_plugin()` returned `false` due to the failing plugin not being found.

Follow-up to [46273].

Props mukesh27, afwebdev, abcd95, sainathpoojary, ankitkumarshah, SergeyBiryukov.
Fixes #62816.
Built from https://develop.svn.wordpress.org/trunk@61448


git-svn-id: http://core.svn.wordpress.org/trunk@60760 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2026-01-07 16:48:03 +00:00
parent 2bc2d405bf
commit 8b04f2cb6f
4 changed files with 31 additions and 33 deletions

View File

@@ -340,12 +340,6 @@ When seeking help with this issue, you may be asked for some of the following in
$theme = wp_get_theme();
$wp_version = get_bloginfo( 'version' );
if ( $extension ) {
$plugin = $this->get_plugin( $extension );
} else {
$plugin = null;
}
$debug = array(
'wp' => sprintf(
/* translators: %s: Current WordPress version number. */
@@ -360,13 +354,17 @@ When seeking help with this issue, you may be asked for some of the following in
),
);
if ( null !== $plugin ) {
$debug['plugin'] = sprintf(
/* translators: 1: The failing plugins name. 2: The failing plugins version. */
__( 'Current plugin: %1$s (version %2$s)' ),
$plugin['Name'],
$plugin['Version']
);
if ( $extension ) {
$plugin = $this->get_plugin( $extension );
if ( is_array( $plugin ) ) {
$debug['plugin'] = sprintf(
/* translators: 1: The failing plugin's name. 2: The failing plugin's version. */
__( 'Current plugin: %1$s (version %2$s)' ),
$plugin['Name'],
$plugin['Version']
);
}
}
$debug['php'] = sprintf(

View File

@@ -7,11 +7,6 @@
*/
return array(
array(
'handle' => 'wp-list-reusable-blocks',
'path' => 'list-reusable-blocks/style',
'dependencies' => array('wp-components'),
),
array(
'handle' => 'wp-nux',
'path' => 'nux/style',
@@ -22,6 +17,11 @@ return array(
'path' => 'preferences/style',
'dependencies' => array('wp-components'),
),
array(
'handle' => 'wp-list-reusable-blocks',
'path' => 'list-reusable-blocks/style',
'dependencies' => array('wp-components'),
),
array(
'handle' => 'wp-commands',
'path' => 'commands/style',
@@ -43,13 +43,13 @@ return array(
'dependencies' => array(),
),
array(
'handle' => 'wp-format-library',
'path' => 'format-library/style',
'handle' => 'wp-patterns',
'path' => 'patterns/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
array(
'handle' => 'wp-patterns',
'path' => 'patterns/style',
'handle' => 'wp-format-library',
'path' => 'format-library/style',
'dependencies' => array('wp-block-editor', 'wp-components'),
),
array(

View File

@@ -12,6 +12,11 @@ return array(
'path' => 'a11y/index',
'asset' => 'a11y/index.min.asset.php',
),
array(
'id' => '@wordpress/interactivity',
'path' => 'interactivity/index',
'asset' => 'interactivity/index.min.asset.php',
),
array(
'id' => '@wordpress/interactivity-router',
'path' => 'interactivity-router/index',
@@ -27,11 +32,6 @@ return array(
'path' => 'core-abilities/index',
'asset' => 'core-abilities/index.min.asset.php',
),
array(
'id' => '@wordpress/interactivity',
'path' => 'interactivity/index',
'asset' => 'interactivity/index.min.asset.php',
),
array(
'id' => '@wordpress/latex-to-mathml',
'path' => 'latex-to-mathml/index',
@@ -47,16 +47,16 @@ return array(
'path' => 'abilities/index',
'asset' => 'abilities/index.min.asset.php',
),
array(
'id' => '@wordpress/route',
'path' => 'route/index',
'asset' => 'route/index.min.asset.php',
),
array(
'id' => '@wordpress/edit-site-init',
'path' => 'edit-site-init/index',
'asset' => 'edit-site-init/index.min.asset.php',
),
array(
'id' => '@wordpress/route',
'path' => 'route/index',
'asset' => 'route/index.min.asset.php',
),
array(
'id' => '@wordpress/lazy-editor',
'path' => 'lazy-editor/index',

View File

@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '7.0-alpha-61447';
$wp_version = '7.0-alpha-61448';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.