[Defender] Defender producing an error

Hey guys,
I am consistently getting this error popping up in my error logs. Any idea what it could be?

PHP Fatal error: Cannot use object of type WP_Error as array in /plugins/wp-defender/app/module/audit/controller/main.php on line 317


  • Adam Czajczyk
    • Support Gorilla

    Hi Baldafrican

    I hope you're fine today!

    I took a look at plugin's code around that location and it seems that what happens is:

    - the data used in this line comes from another function that's trying to pull Defender logs
    - those logs are stored on our end and pulled via API
    - that function for some reason is not able to pull these logs and returns wp_error instead, which in turn is passed to that original code and cases an error.

    Now, the question is then why it can't pull these logs and I'm not quite sure why. It looks like some "connectivity" issue to our API. I believe you do have WPMU DEV Dashboard up and running (and logged in to your account) on that site and other "API related" features are working fine? By those I mean things like installing/updating our plugins via WPMU DEV -> Plugins page in back-end or smushing images with WP Smush and so on.

    Can you confirm that?

    Also, was Defender working fine before without this error and it only started to happen at some point - if so, were there any changes made on site or server around that time?

    Let me know please.

    Best regards,

    • Baldafrican
      • Made in Africa

      Hi Adam Czajczyk ,

      Thanks for the reply.
      The rest of the products appear to be working fine. By that I mean smush is smushing and am able to update the products from the hub without any issue.

      I actually only came across the errors as I went in to view the error log otherwise there is no actual display of the error. So for this reason I can't answer your last question accurately unfortunately.

      Perhaps I should try to reinstall it and then monitor it and see when/if the errors come through?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.