Site Health: Fix debug data with nested fields for copying.

* Use `$debug_data` instead of `$field['value']` to retrieve the debug data.
* Rename inner variables to avoid overriding the output variable.

Props Clorith, ocean90.
See #46573.
Built from https://develop.svn.wordpress.org/trunk@45246


git-svn-id: http://core.svn.wordpress.org/trunk@45055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2019-04-18 16:26:51 +00:00
parent 3e6183c69c
commit 2d58638ba0
2 changed files with 3 additions and 3 deletions

View File

@ -1059,8 +1059,8 @@ class WP_Debug_Data {
if ( is_array( $debug_data ) ) {
$value = '';
foreach ( $field['value'] as $name => $value ) {
$value .= sprintf( "\n\t%s: %s", $name, $value );
foreach ( $debug_data as $sub_field_name => $sub_field_value ) {
$value .= sprintf( "\n\t%s: %s", $sub_field_name, $sub_field_value );
}
} elseif ( is_bool( $debug_data ) ) {
$value = $debug_data ? 'true' : 'false';

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta3-45245';
$wp_version = '5.2-beta3-45246';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.