[Defender] PHP incompatible with WP-Defender plugin

I have the latest version of Wordpress and Wp-Defender installed. WP-Defender is not written for PHP 7.2 support. It is getting hundreds of warnings in the error log for improper use of count() function. There error looks like this:

PHP Warning: count(): Parameter must be an array or an object that implements Countable in /public_html/wp-content/plugins/wp-defender/app/module/ip-lockout/controller/main.php on line 543

  • Adam Czajczyk
    • Support Gorilla

    Hello Raymond Gonzalez

    I hope you're well today and thank you for your your post.

    The Defender is created with full PHP 7.x compatibility in mind. It might include some code for maintaining backward compatibility but that's not the case here.

    The message that you're getting is indeed typical to 7.2.x but running 7.2.x doesn't seem to be the cause for this notice to appear. I couldn't replicate this on my own test sites on 7.2.4 and I believe that there must be some additional factor involved there.

    Have you tried to perform a full theme/plugin conflict test to see what that could be? If not, could you please do it? The procedure is nicely described on this flow-chart here:

    https://premium.wpmudev.org/wp-content/uploads/2015/09/Support-Process-Support-Process.gif

    The point here is to find out what is actually triggering that message in a log and that would help our developers to find a "cure" for this. If you could preform such test and let me know about results, that'd be very helpful and I would then forward the case along with test results to our developers so they could take care of it.

    Kind regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.