Title: PHP 7.2 Warning &#8211; count() doesn&#8217;t implement Countable
Last modified: August 21, 2018

---

# PHP 7.2 Warning – count() doesn’t implement Countable

 *  Resolved [willberforce](https://wordpress.org/support/users/willberforce/)
 * (@willberforce)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-7-2-warning-count-doesnt-implement-countable/)
 * I report PHP Warnings generated with PHP 7.2 when in the admin area of Security
   Tweaks.
 * PHP Warning: count(): Parameter must be an array or an object that implements
   Countable in /home/*****/******/wp-content/plugins/defender-security/app/module/
   ip-lockout/controller/main.php on line 544
 * PHP 7.2.8
    WP 4.9.8 Defender Security 1.9.1
 * Thanks.
    -  This topic was modified 7 years, 9 months ago by [willberforce](https://wordpress.org/support/users/willberforce/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-7-2-warning-count-doesnt-implement-countable%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Predrag – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support1/)
 * (@wpmudev-support1)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-7-2-warning-count-doesnt-implement-countable/#post-10614338)
 * Hi [@willberforce](https://wordpress.org/support/users/willberforce/),
 * I was just testing this on my installation running 7.2.8 but I’m afraid that 
   I can’t replicate this issue there 🙁
 * Can you tell me which security tweaks you have active, as well as the settings
   inside IP lockouts section so I could try setting it up the same way and see 
   if I can replicate it after that?
 * Cheers,
    Predrag
 *  Thread Starter [willberforce](https://wordpress.org/support/users/willberforce/)
 * (@willberforce)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-7-2-warning-count-doesnt-implement-countable/#post-10622481)
 * Thanks Predrag. Obviously, this isn’t critical as (a) its only a PHP warning 
   and not an error, and (b) I can run this on PHP 7.1.x without a problem.
 * Here are the settings in case it helps.
 * 11/11 Security Tweaks actioned…
 * Disable trackbacks and pingbacks
    Update WordPress to latest version Update PHP
   to latest version Change default admin user account Change default database prefix
   Disable the file editor Hide error reporting Update old security keys Prevent
   Information Disclosure Prevent PHP execution Manage Login Duration
 * Login protection is enabled. There are no lockouts logged yet.
    Lockout threshold
   5 failed logins within 300 seconds Lockout time: 300 seconds
 * Lockout threshold 20 errors within 300 seconds
    Lockout time 300 seconds Permanently
   ban 404 lockouts: Off Exclusions Monitor 404s from logged in users: On
 * Login Protection Lockout: On
    404 Detection Lockout: On
 * IP Banning
    Blacklist: empty Whitelist: my IP address is listed here
 * NOTIFICATIONS
    Send email notifications Login Protection Lockout: enabled 404
   Detection Lockout: enabled Email recipients: my username Repeat Lockouts: Limit
   email notifications for repeat lockouts: off (3, 24h)
 * Settings
    Storage 30 days
 * Thanks again.
    -  This reply was modified 7 years, 9 months ago by [willberforce](https://wordpress.org/support/users/willberforce/).
 *  Plugin Support [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * (@wpmudev-support9)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/php-7-2-warning-count-doesnt-implement-countable/#post-10624258)
 * Hello [@willberforce](https://wordpress.org/support/users/willberforce/)
 * Hope all is well!
 * Looks like this is a common error with PHP 7.2.x version. I can’t reproduce it
   on my end, however, I’ve reported it to our developers so they could have a closer
   look.
 * Thank you for letting us know about it!
 * Kind regards,
    Nastia

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

The topic ‘PHP 7.2 Warning – count() doesn’t implement Countable’ 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/)

 * 3 replies
 * 3 participants
 * Last reply from: [Imran – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support9/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/php-7-2-warning-count-doesnt-implement-countable/#post-10624258)
 * Status: resolved