Title: Array to string conversion
Last modified: July 3, 2025

---

# Array to string conversion

 *  Resolved [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/array-to-string-conversion-15/)
 * Hi,
 * We are getting a lot of these since the last update …
 *     ```wp-block-code
       [03-Jul-2025 12:17:57 UTC] E_WARNING: Array to string conversion in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php on line 1917
       ```
   
 * Changing that line from …
 *     ```wp-block-code
           return wfWAFUtils::json_decode(@(string)$value, true);
       ```
   
 * …. to …
 *     ```wp-block-code
           return is_array($value) ? null : wfWAFUtils::json_decode(@(string)$value, true);
       ```
   
 * … should resolve the issue.
 * We know that we can turn off our error log but we use it to identify issues so
   we don’t need to be advised of that.
 * Thank you.
 * Oliver

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

 *  Plugin Support [wfphil](https://wordpress.org/support/users/wfphil/)
 * (@wfphil)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/array-to-string-conversion-15/#post-18540264)
 * Hi [@domainsupport](https://wordpress.org/support/users/domainsupport/)
 * Your PHP error reporting is ignoring our legitimate PHP error supression as we
   need to do that sometimes in our plugin.
 * The warning is on **wordfence/vendor/wordfence/wf-waf/src/lib/rules.php – line:
   1917**
 * This is when firewall rules need to check if a value contains specific values
   in JSON data.  If the data being decoded isn’t JSON, a warning could occur even
   if it’s a string but not valid JSON. The warning on arrays occurs in newer PHP
   versions so we’ll look at preventing it, but the suppression was originally intended
   to handle invalid JSON of any kind, and would still be necessary.
 *  Thread Starter [Oliver Campion](https://wordpress.org/support/users/domainsupport/)
 * (@domainsupport)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/array-to-string-conversion-15/#post-18541421)
 * Yes, we need to see all errors incase there’s anything important that needs to
   be dealt with.
 * To help you, the issue arrises from admin-ajax requests like this …
 *     ```wp-block-code
       [wp-check-locked-posts] => Array    (        [0] => post-xxxx        [1] => post-xxxx        [2] => post-xxxx        [3] => post-xxxx        [4] => post-xxxx    )
       ```
   
 * So this will happen every time an admin Posts screen is loaded.
 * Oliver
 *  Plugin Support [wfphil](https://wordpress.org/support/users/wfphil/)
 * (@wfphil)
 * [1 year, 2 months ago](https://wordpress.org/support/topic/array-to-string-conversion-15/#post-18544229)
 * Hi [@domainsupport](https://wordpress.org/support/users/domainsupport/)
 * Thank you for the update. Please refer to my last reply.
 *  [Jason](https://wordpress.org/support/users/galapogos01/)
 * (@galapogos01)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/array-to-string-conversion-15/#post-18581035)
 * When will a fixed be released for this? We’re seeing loads of the same ajax errors
   when viewing WooCommerce orders.
    -  This reply was modified 1 year, 1 month ago by [Jason](https://wordpress.org/support/users/galapogos01/).

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

 The topic ‘Array to string conversion’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [Jason](https://wordpress.org/support/users/galapogos01/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/array-to-string-conversion-15/#post-18581035)
 * Status: resolved