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. git-svn-id: https://develop.svn.wordpress.org/trunk@45246 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eda377ba9e
commit
1eb665b20c
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user