Title: Array to string conversion in [&#8230;]/wp-admin/includes/class-wp-debug-data.php
Last modified: May 20, 2024

---

# Array to string conversion in […]/wp-admin/includes/class-wp-debug-data.php

 *  [Str3lla](https://wordpress.org/support/users/cp_so/)
 * (@cp_so)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/)
 * Hi,
   I recently noticed several warnings of this type in the error logs:
 *     ```wp-block-code
       PHP Warning: Array to string conversion in [...]/wp-admin/includes/class-wp-debug-data.php on line 1543.
       ```
   
 * The problem occurs when visiting the site health info screen if Solid Security
   is active; deactivating the plugin makes the warnings disappear.
 * The Query Monitor plugin provided me with the following additional information
   about the error:
 * wp-admin/includes/class-wp-debug-data.php:1543
   sprintf()wp-admin/includes/class-
   wp-debug-data.php:1543WP_Debug_Data::format()wp-admin/site-health-info.php:56WP_Site_Health-
   >show_site_health_tab()wp-includes/class-wp-hook.php:324do_action(‘site_health_tab_content’)
   wp-admin/site-health.php:220
 * I thought it might be related to the custom Site Health Tab of Solid Security,
   but I haven’t delved into it.
 * I first noticed the issue on a client’s site, but I was able to reproduce it 
   on a fresh install with the default theme (Twenty Twenty-Four) and no plugins,
   except for Query Monitor and Solid Security.
 * LiteSpeed server, php 8.2. 
   WordPress 6.5.3Solid Security Basic 9.3.2
 * Thank you for any help you can provide 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17767023)
 * Hi [@cp_so](https://wordpress.org/support/users/cp_so/),
 * It’s a(n easily reproducible) bug in the **add_site_health_info**() method which
   is located in the better-wp-security/core/modules/core/class-itsec-core-admin.
   php file. The plugin method is returning an array() value instead of a string
   value for **debug** data (key settings).
 * Note the PHP warning(s) are visible in the (debug) output generated by the **
   Copy site info to clipboard** button.
 * +++ To prevent any confusion, I’m not SolidWP +++
    -  This reply was modified 1 year, 10 months ago by [nlpro](https://wordpress.org/support/users/nlpro/).
    -  This reply was modified 1 year, 10 months ago by [nlpro](https://wordpress.org/support/users/nlpro/).
 *  Thread Starter [Str3lla](https://wordpress.org/support/users/cp_so/)
 * (@cp_so)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17767057)
 * Thanks [@nlpro](https://wordpress.org/support/users/nlpro/)!
   Do you know if there
   are any plans for a fix from Solid Security?
 * Thank you again, and have a great day.
 *  Plugin Support [chandelierrr](https://wordpress.org/support/users/shanedelierrr/)
 * (@shanedelierrr)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17767128)
 * Hi [@cp_so](https://wordpress.org/support/users/cp_so/), great to see you!
 * I am seeing this on a [fresh install](https://share.zight.com/JruELJyD) as well
   and have escalated it to our dev team for checking. I don’t have an ETA for the
   fix, but we’ll surely address this since this is reproducible on our end.
 * [@nlpro](https://wordpress.org/support/users/nlpro/), thank you for your input
   on the issue. It’s greatly appreciated!
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17767178)
 * Hi [@cp_so](https://wordpress.org/support/users/cp_so/),
 * Temporary workaround:
 *     ```wp-block-code
       add_filter( 'debug_information', 'reset_site_health_info' );
   
       function reset_site_health_info( $info ) {
   
       	$info['solid-security']['fields']['settings']['debug'] = $info['solid-security']['fields']['settings']['value'] . ' (Debug value reset to default to prevent PHP warnings due to a bug in the Solid Security Basic 9.3.2 release).';
   
       	return $info;
       }
       ```
   
    -  This reply was modified 1 year, 10 months ago by [nlpro](https://wordpress.org/support/users/nlpro/).
 *  Thread Starter [Str3lla](https://wordpress.org/support/users/cp_so/)
 * (@cp_so)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17767987)
 * Hi [@shanedelierrr](https://wordpress.org/support/users/shanedelierrr/), happy
   to hear that. Thank you for the prompt support.
 * Thanks again, [@nlpro](https://wordpress.org/support/users/nlpro/): your kindness
   is invaluable.
   I will take a look at your workaround right away!
 * PS: Most supportive support forum ever.
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-17768480)
 * Hi [@cp_so](https://wordpress.org/support/users/cp_so/),
 * If my earlier code snippet is not taking care of all the PHP warnings try the
   one below (thoroughly tested):
 *     ```wp-block-code
       add_filter( 'debug_information', 'reset_site_health_info', 11 );
   
       function reset_site_health_info( $info ) {
   
       	$msg = ' (Debug value reset to default to prevent PHP warnings due to a bug in the Solid Security Basic 9.3.2 release).';
   
       	$info['solid-security']['fields']['settings']['debug'] = $info['solid-security']['fields']['settings']['value'] . $msg;
   
       	$info['solid-security']['fields']['user_groups']['debug'] = $info['solid-security']['fields']['user_groups']['value'] . $msg;
   
       	return $info;
       }
       ```
   
 *  [nlpro](https://wordpress.org/support/users/nlpro/)
 * (@nlpro)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-18128641)
 * Hi [@cp_so](https://wordpress.org/support/users/cp_so/),
 * According to the 9.3.4 Changelog:
 * > Bug Fix: PHP warning on Site Health page.
 * Please update the SolSec plugin to the 9.3.4 release (remove the temporary workaround
   filter I recommended) and then confirm the issue has been fixed in your env. 
   If so, please mark this topic as ‘Resolved’.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Array to string conversion in […]/wp-admin/includes/class-wp-debug-data.
php’ is closed to new replies.

 * ![](https://ps.w.org/better-wp-security/assets/icon.svg?rev=2980272)
 * [Solid Security – Password, Two Factor Authentication, and Brute Force Protection](https://wordpress.org/plugins/better-wp-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-wp-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-wp-security/)
 * [Active Topics](https://wordpress.org/support/plugin/better-wp-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-wp-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-wp-security/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [nlpro](https://wordpress.org/support/users/nlpro/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/array-to-string-conversion-in-wp-admin-includes-class-wp-debug-data-php/#post-18128641)
 * Status: not resolved