• I am getting this error on the users page.

    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php:443 Stack trace: #0 /wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php(443): array_key_exists() #1 /wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php(191): WordfenceLS\Controller_Permissions->does_user_have_multisite_capability() #2 /wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php(653): WordfenceLS\Controller_Users->can_activate_2fa() #3 /wp-includes/class-wp-hook.php(324): WordfenceLS\Controller_Users->_user_row_actions() #4 /wp-includes/plugin.php(205): WP_Hook->apply_filters() #5 /wp-admin/includes/class-wp-users-list-table.php(520): apply_filters() #6 /wp-admin/includes/class-wp-users-list-table.php(415): WP_Users_List_Table->single_row() #7 /wp-admin/includes/class-wp-list-table.php(1709): WP_Users_List_Table->display_rows() #8 /wp-admin/includes/class-wp-list-table.php(1636): WP_List_Table->display_rows_or_placeholder() #9 /wp-admin/users.php(814): WP_List_Table->display() #10 {main} thrown in /wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php on line 443
    There has been a critical error on this website.

    • This topic was modified 10 months, 3 weeks ago by paulroberts.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @paulroberts, thanks for providing the error.

    Is this site part of a multisite installation, and if so is it the main site? Have you enabled 2FA or reCAPTCHA for any accounts outside of the user page, such as your admin account directly from Wordfence > Login Security?

    Also are you using a fresh installation of Wordfence, or have you been using it for longer? Either way, are you on version 7.11.1 right now?

    Many thanks,
    Peter.

    [11-Jan-2024 09:41:10 UTC] PHP Fatal error: Uncaught Error: Call to undefined function WordfenceLS\get_current_site() in /home/…OMITTED…/…OMITTED….com/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php:128
    Stack trace: 0 /home/…OMITTED…/…OMITTED….com/wp-includes/class-wp-hook.php(324): WordfenceLS\Controller_Permissions->_role_sync_cron() 1 /home/…OMITTED…/…OMITTED….com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(”, Array) 2 /home/…OMITTED…/…OMITTED….com/wp-includes/plugin.php(565): WP_Hook->do_action(Array) 3 /home/…OMITTED…/…OMITTED….com/wp-cron.php(191): do_action_ref_array(‘wordfence_ls_ro…’, Array) 4 {main}

    thrown in /home/…OMITTED…/…OMITTED….com/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php on line 128

    I’ve encountered a similar problem with get_current_site() and permissions.php file on lines 128.

    Background: Wordfence had been working perfectly. A while back I transitioned to a multi-site installation with plans for more than one site on the server, however, decided not to do that so removed multi-site. The site is running fine with no problems after downgrade to single site. Note sure that this problem is related to that or not.

    The get_current_site() makes me think that Wordfence still thinks this is a multi-site install. What might the fix be?

    BTW, I’ve tried uninstalling and reinstalling the Wordfence plugin, but that hasn’t resovled the issue.

    PHP Version:?8.3.0
    WordPress Version:?6.4.2
    WordPress Language Code:?en_US

    • This reply was modified 10 months, 2 weeks ago by kognetiks.
    • This reply was modified 10 months, 2 weeks ago by kognetiks.

    Line 128 refers to ????????????$network_id = get_current_site()->id;

    Reverting from multi-site to single-site might be the root cuase.

    How do we get this fixed?

    I just deleted the wordfence_ls_role_sync_cron which might help/hurt?

    Thread Starter paulroberts

    (@paulroberts)

    it is multi site install

    >Have you enabled 2FA or reCAPTCHA

    Don’t think so, I have had to disable wordfence as users can’t log in

    • This reply was modified 10 months, 2 weeks ago by paulroberts.

    Deleting the wordfence_ls_role_sync_cron cron job seems to have resolved the issue. But not knowing exactly what this does, what else might it affect.

    Thread Starter paulroberts

    (@paulroberts)

    Wordfence Security – Anti-virus, Firewall and Malware Scan

    Version 7.11.1

    i get the error on wp-admin/users.php

    and users get it on login page.

    • This reply was modified 10 months, 2 weeks ago by paulroberts.
    Thread Starter paulroberts

    (@paulroberts)

    Do you plan on fixing this it been 2 weeks, 6 days? without the plugin working?

    scott8035

    (@scott8035)

    I’m receiving the same/similar error: “PHP Fatal error: Uncaught Error: Call to undefined function WordfenceLS\get_current_site()”. This site was exported from a multi-site install and was converted with plugin “Prime Mover Pro”.

    Thread Starter paulroberts

    (@paulroberts)

    this is still an issue, do you plan on fixing it?

    Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in httpdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php:443 Stack trace: #0 httpdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php(443): array_key_exists() #1 httpdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php(195): WordfenceLS\Controller_Permissions->does_user_have_multisite_capability() #2 httpdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/users.php(656): WordfenceLS\Controller_Users->can_activate_2fa() #3 httpdocs/wp-includes/class-wp-hook.php(324): WordfenceLS\Controller_Users->_user_row_actions() #4 httpdocs/wp-includes/plugin.php(205): WP_Hook->apply_filters() #5 httpdocs/wp-admin/includes/class-wp-users-list-table.php(520): apply_filters() #6 httpdocs/wp-admin/includes/class-wp-users-list-table.php(415): WP_Users_List_Table->single_row() #7 httpdocs/wp-admin/includes/class-wp-list-table.php(1706): WP_Users_List_Table->display_rows() #8 httpdocs/wp-admin/includes/class-wp-list-table.php(1633): WP_List_Table->display_rows_or_placeholder() #9 httpdocs/wp-admin/users.php(814): WP_List_Table->display() #10 {main} thrown in httpdocs/wp-content/plugins/wordfence/modules/login-security/classes/controller/permissions.php on line 443

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Fatal error: PHP8.2’ is closed to new replies.