[Defender] Defender: Fatal Error in content-scan.php

Have been getting a lot of these. Please fix.

[13-Nov-2018 02:46:13 UTC] PHP Fatal error: Uncaught Error: Cannot unset string offsets in /wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php:86

Stack trace:

#0 /wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php(47): WP_DefenderModuleScanBehaviorProContent_Scan->scanAFile('/home/spsitesl/…':wink:

#1 [internal function]: WP_DefenderModuleScanBehaviorProContent_Scan->processItemInternal(Array, '/home/spsitesl/…':wink:

#2 /wp-content/plugins/wp-defender/vendor/hammer/base/component.php(217): ReflectionMethod->invokeArgs(Object(WP_DefenderModuleScanBehaviorProContent_Scan), Array)

#3 /wp-content/plugins/wp-defender/vendor/hammer/queue/queue.php(184): HammerBaseComponent->__call('processItemInte…', Array)

#4 /wp-content/plugins/wp-defender/app/module/scan/component/scan-api.php(251): HammerQueueQueue->processItem()

#5 /wp-content/plugin in /wp-content/plugins/wp-defender/app/module/scan/behavior/pro/content-scan.php on line 86

  • Adam Czajczyk
    • Support Gorilla

    Hello Clifford P

    I hope you’re well today and thank you for your question!

    I tried to replicate this on my end but I couldn’t get my test sites to trigger such error. Could you tell me please:

    – what’s the PHP version that is powering your site?

    – are you by any chance using Jetpack (there’s been reports in the past about similar issue in relation to it)?

    – are you seeing that error in the wp-admin area or do you have WP debugging enabled and it’s in a debug.log file?

    – did it started to happen just recently or is it ever since you got Defender installed?

    I would also like to take a closer look at your setup to see the configuration as this could help me replicate the issue on my end to further troubleshoot it. You may enable support access by going to the “WPMU DEV -> Support” page in your site’s back-end and clicking on “Grant support access” button there.

    Looking forward to your response,


  • Clifford P
    • The Bug Hunter

    I enabled support access. You can go to wp-admin > Dashboard > Health Check to view the system info.

    I saw the error as recently as that date (Nov 13) but don’t see it at this moment. Maybe something with the scanning action that happens every so often?

  • Predrag Dubajic
    • Support

    Hi Clifford,

    I had a chat with our devs about this and it seems that this issue was happening on certain installations, the good news is that it’s something already being fixed in next version they are working on.

    So if everything goes well with QA testing we should see it live soon.

    Best regards,


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.