[Defender] Defender scan not working

I am currently facing some problems when trying to run the Defender scan on my site. The scan always stucks. Here's the abstract from the debug log:

PHP Fatal error: Uncaught Error: Cannot unset string offsets in [path to installation]/wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php:86
Stack trace:
#0 [path to installation]/wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php(47): WP_Defender\Module\Scan\Behavior\Pro\Content_Scan->scanAFile('/home/www/web14...':wink:
#1 [internal function]: WP_Defender\Module\Scan\Behavior\Pro\Content_Scan->processItemInternal(Array, '/home/www/web14...':wink:
#2 [path to installation]/wp-content/plugins/wp-defender/vendor/hammer/base/component.php(217): ReflectionMethod->invokeArgs(Object(WP_Defender\Module\Scan\Behavior\Pro\Content_Scan), Array)
#3 [path to installation]/wp-content/plugins/wp-defender/vendor/hammer/queue/queue.php(184): Hammer\Base\Component->__call('processItemInte...', Array)
#4 [path to installation]/wp-content/plugins/wp-defender/app/module/scan/component/scan-api.php(251): Hammer\Queue\Queue->processItem in [path to installation]/wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php on line 86

When I try to run the scan via the WPMUDEV Hub I receive the following error:

We got an unexpected response from your website: "500 Internal Server Error"

Do you have any advice on how to fix this?

Additional information:
- PHP 7.1 is running
- I already deleted Defender and reinstalled it.
- There is another site running in a different directory on this server and the Defender scan is working properly there.
- the scan always stucks while analyzing the WordPress content.

Thank you in advance for your help.

  • Dimitris
    • Support Star

    Hello there Roger ,

    hope you're doing good today and thanks for reaching us! :slight_smile:

    I tried to search for previous reported issues around this error message, with no avail though. I'm also unable to replicate in my testing sites.

    the scan always stucks while analyzing the WordPress content.

    Can you try to replace all WP core files, just to be sure that there's nothing wrong there?
    Just download latest version of WP, uncompress the file locally and upload all folders and files apart from /wp-content/ folder.

    Other than that, a conflict test should be made in order to make sure that there's nothing else involving there. Prior to any test, please backup all files and database in case you want to restore it. Then start deactivating plugins one by one and each time check how File Scanning responds.

    I've also pinged Defender's lead developer on this, in case above error message rings any bell. I'll keep you posted here, as soon as I've got some valuable insights.

    Warm regards,

  • Roger
    • New Recruit

    hi Dimitris,
    thank you so much for your reply

    It's odd, i just gave it another try and everything is now working properly although no changes has been made. There is also nothing listed in the debug log anymore.

    Nevertheless thank you very much for your assistance.

    Kind regards

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.