Title: Defender Error
Last modified: April 19, 2021

---

# Defender Error

 *  Resolved [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/)
 * Warning: in_array() expects parameter 2 to be array, string given in /home/customer/
   xxx/xxxxxxxxxx.co.uk/public_html/wp-content/plugins/defender-security/src/model/
   setting/security-tweaks.php on line 56
 * Warning: count(): Parameter must be an array or an object that implements Countable
   in /home/customer/xxx/xxxxxxxxxx.co.uk/public_html/wp-content/plugins/defender-
   security/src/controller/security-tweaks.php on line 393
 * Warning: Invalid argument supplied for foreach() in /home/customer/xxx/xxxxxxxxxx.
   co.uk/public_html/wp-content/plugins/defender-security/src/controller/security-
   tweaks.php on line 599

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

 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14339336)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/),
 * Thank you for contacting us.
 * Could you please confirm which PHP version your site is currently running on?
 * Best,
    Jonathan S
 *  Thread Starter [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14340278)
 * Hi Jonathan,
    Current PHP is 7.3.27. Hope this helps. Regards John Milburn
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14351667)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * Thank you for the information.
 * Can you confirm if the headers are configured in the Defender > Advanced Tools
   > Headers, I checked my website using the Query Monitor but couldn’t see similar
   logs.
 * Best Regards
    Patrick Freitas
 *  Thread Starter [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14352633)
 * Hi Patrick,
    Thanks for reply. The security headers are all on, but I do not 
   mask the login area. The errors only appear on the Dashboard and recommendations
   tabs. The error does not appear so far to affect the performance of Defender.
   Hope this helps Kind regards John M
 *  Plugin Support [Nithin – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport11/)
 * (@wpmudevsupport11)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14355780)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/),
 * We have reported this to our Defender teams attention in order to ensure the 
   mentioned warnings could be fixed in the next release.
 * However, as you have stated this shouldn’t affect the workflow of your website
   nor the performance of the plugins in any way.
 * Please do check whether you have debug mode enabled, ie check whether you have
   the following line of code added inside the wp-config.php file:
    `define( 'WP_DEBUG',
   true );`
 * If yes, changing the above line to the following should help with disabling debug
   mode, which should, in turn, remove the logs from the dashboard:
 * `define( 'WP_DEBUG', true );`
 * Switching to PHP v 7.1 should also help with resolving the above warning too.
   I hope this helps, please do let us know if you have any further query.
 * Kind Regards,
    Nithin
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14380201)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * I hope you are doing well and safe!
 * We haven’t heard from you in a while, I’ll mark this thread as resolved.
 * Feel free to let us know if you have any additional question or problem.
 * Best Regards
    Patrick Freitas
 *  Thread Starter [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/defender-error/#post-14411881)
 * Hi Patrick,
    Thanks for reply. Sorry for the delay of my reply due to current
   workload. The errors still appear on the Dashboard and recommendations tabs. 
   I have updated the wp config file as requested to: define( ‘WP_DEBUG’, true );
   The site is hosted by Siteground who update the PHP version automatically as 
   soon as a new stable version is available. Current PHP version 7.3.27 In addition,
   I am unable to update the Security Recommendations Hope this helps Kind regards
   John M
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14513408)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * I hope you are doing well.
 * Our developers are working to fix it, would be possible to send some information?
 *     ```
       - Please, check if you still have the issue.
   
       If so,
   
       - Go to Defender > Settings > Preset Configs page
   
       - Click on Save New button
   
       - Add the name of the config and Save
   
       - Click on Download for this new config
       ```
   
 * Upload the configuration in Google drive and share the link.
 * Best Regards
    Patrick Freitas
 *  Thread Starter [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14516832)
 * Hi Patrick,
    Thanks for reply. Yes, I still have the issue. Here is the link 
   to the file you request. [https://drive.google.com/file/d/1f9dEF4p8cjrbgeF3fX-4wjX_7CMkKiKT/view?usp=sharing](https://drive.google.com/file/d/1f9dEF4p8cjrbgeF3fX-4wjX_7CMkKiKT/view?usp=sharing)
   Kind regards John M
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14517139)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * Thank you for the file and update,
 * We sent it to our developers so we can keep working to fix it.
 * Best Regards
    Patrick Freitas
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14521555)
 * Hi [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * Could you please try to import this setting and remove the old one to check if
   the issue is gone?
 * [https://www.dropbox.com/s/40epblpja8e0q49/wp-defender-config-jmConfig090521-updated.json?dl=0](https://www.dropbox.com/s/40epblpja8e0q49/wp-defender-config-jmConfig090521-updated.json?dl=0)
 * Let us know the result you got.
    Best Regards Patrick Freitas
 *  Thread Starter [jholm22804](https://wordpress.org/support/users/jholm22804/)
 * (@jholm22804)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14523432)
 * Hi Patrick,
    Thanks for reply. I have imported the setting and yes the issue 
   is now gone. I was also able to apply the 4 outstanding Security Recommendations.
   Great work. Thank you. Interested to know what was wrong. But if you do not have
   the time I understand. I’m happy for now. Kind regards John M
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [5 years ago](https://wordpress.org/support/topic/defender-error/#post-14525764)
 * HI [@jholm22804](https://wordpress.org/support/users/jholm22804/)
 * The issue was the config file had a broken structure, so our developers added
   some extra check to prevent the problem.
 * Best Regards
    Patrick Freitas
 *  [Élisson Costa](https://wordpress.org/support/users/nossileee/)
 * (@nossileee)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/defender-error/#post-14580211)
 * .
    -  This reply was modified 4 years, 11 months ago by [Élisson Costa](https://wordpress.org/support/users/nossileee/).

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

The topic ‘Defender Error’ is closed to new replies.

 * ![](https://ps.w.org/defender-security/assets/icon-256x256.gif?rev=3435930)
 * [Defender Security - Malware Scanner, Login Security & Firewall](https://wordpress.org/plugins/defender-security/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/defender-security/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/defender-security/)
 * [Active Topics](https://wordpress.org/support/plugin/defender-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/defender-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/defender-security/reviews/)

 * 14 replies
 * 5 participants
 * Last reply from: [Élisson Costa](https://wordpress.org/support/users/nossileee/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/defender-error/#post-14580211)
 * Status: resolved