[Defender] Defender Pro php warning

We got a warning while using your defender plugin. In wp-defender/app/module/ip-lockout/controller/main.php file at 544 line before using count($args) you should check if $args is an array.
This is the warning:
PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/plugins/wp-defender/app/module/ip-lockout/controller/main.php on line 544
Could you correct this error? It pollutes our log.

  • Adam Czajczyk

    Hi Piotr

    I hope you're well today!

    I suppose the site's running on PHP 7.2.x, right? That's a warning and apart from, as you called it, "polluting logs" it actually shouldn't cause the plugin to malfunction but of course it shouldn't be there.

    We've had one single report of that in the past but, interestingly, we weren't able to replicate it so I believe it's strictly related to either specific version of PHP or some "combination" of PHP and other configuration aspects.

    That said, I've reported it to our developers again but I'd also like to ask you what exact version of PHP are you using and is it on Apache or Nginx and what version of it?

    Let me know, please, but also keep an eye on this ticket in case our developers had additional questions and I'm sure we'll be able to sort that out!

    Best regards/Pozdrawiam,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.