![]() In the get function where the JSON string is derived, I changed: But the same cannot be used as input to json_decode, or course. Based on other getJSON calls in the code, it is intended that the second argument is/can be an array, and if json_decode returns null, it is also returned directly, where a decoded array is expected. Hence as second argument is an array and no JSON, which then causes the type error in json_decode. WfConfig::getJSON($previousKey, array(0, false)) In lib/wfUtils.php(1730) however it is called like this: It hence expects up to three arguments, the second being an optional default JSON to return. GetJSON($key, $default = false, $allowCached = true) In lib/wfConfig.php(545), the declared function is: #10 /var/www/blog/wp-includes/user.php(95): wp_authenticate() #9 /var/www/blog/wp-includes/pluggable.php(593): apply_filters() #8 /var/www/blog/wp-includes/plugin.php(189): WP_Hook->apply_filters() #7 /var/www/blog/wp-includes/class-wp-hook.php(303): wordfence::authenticateFilter() #6 /var/www/blog/wp-content/plugins/wordfence/lib/wordfenceClass.php(3098): wordfence::processBruteForceAttempt() #5 /var/www/blog/wp-content/plugins/wordfence/lib/wordfenceClass.php(3126): wordfence::checkSecurityNetwork() #4 /var/www/blog/wp-content/plugins/wordfence/lib/wordfenceClass.php(3108): wfActivityReport::logBlockedIP() ![]() ![]() #3 /var/www/blog/wp-content/plugins/wordfence/lib/wfActivityReport.php(448): wfUtils::IP2Country() #2 /var/www/blog/wp-content/plugins/wordfence/lib/wfUtils.php(1615): wfUtils::check_and_log_last_error() #1 /var/www/blog/wp-content/plugins/wordfence/lib/wfUtils.php(1730): wfConfig::getJSON() #0 /var/www/blog/wp-content/plugins/wordfence/lib/wfConfig.php(545): json_decode() I suspect this being the case since I upgraded to PHP8.1, though it seems to be a bug in the code independently:Įrror message: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, array given in /var/www/blog/wp-content/plugins/wordfence/lib/wfConfig.php:545 I recently face TypeError’s with the plugin, when a login is blocked as brute force attempt and tried to be logged, it seems.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |