WF-Related Fatal Errors in PHP Log
-
I’m running Wordfence 7.5.9 on WordPress 5.9.3. I check the PHP error log fairly regularly, and today I noticed an unusual number of errors related to Wordfence.
All of them are essentially the same (the actual path/domain name replaced with “redacted”):
PHP Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /nas/content/live/redacted/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/mysql.php:144\nStack trace:\n#0 /nas/content/live/redacted/wp-content/plugins/wordfence/lib/wordfenceClass.php(8661): wfWAFStorageMySQL->getNewestAttackDataArray(1649382099.01)\n#1 /nas/content/live/redacted/wp-includes/class-wp-hook.php(305): wordfence::syncAttackData()\n#2 /nas/content/live/redacted/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#3 /nas/content/live/redacted/wp-includes/plugin.php(474): WP_Hook->do_action(Array)\n#4 /nas/content/live/redacted/wp-settings.php(587): do_action('init')\n#5 /nas/content/live/redacted/wp-config.php(128): require_once('/nas/content/li...')\n#6 /nas/content/live/redacted/wp-load.php(50): require_once('/nas/content/li...')\n#7 /nas/content/live/redacted/wp-blog-header.php(13): require_once('/nas/content/li...')\n#8 /nas/content/live/redacted/index.php(17): require('/nas/content/li...')\n#9 {main}\n thrown in /nas/content/live/redacted/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/storage/mysql.php on line 144, referer: https://www5.redacted.org/customer-service/customer-connect/
There are nearly 900 of these in the log from the past two days, with only the referer being different. I don’t know exactly when the problem started, but I’m pretty sure it’s recent. The last time I know I checked the log was around 9 pm Thursday, April 7, after I ran a number of updates, and there were no such errors at that time.
The function throwing the error seems to be getAttackData(), at the point it starts parsing the $actionData array. I looked in the wfhits table and see that a fair number of the log entries have no actionData stored (none for loginOK, logout, loginFailValidUsername, lostPassword, scan:detectproxy and possbly others). So it may be an empty field where an array is expected. Don’t know if that’s the issue or if there is something deeper beyond my understanding.
- The topic ‘WF-Related Fatal Errors in PHP Log’ is closed to new replies.