• Hi,

    After updating WP 2FA to version 1.7.0, there has been multiple entries in the error log related to WP 2FA causing PHP fatal error. This has not occurred prior to version 1.7.0.

    The error log is reproduced below:

    PHP Fatal error:  Uncaught TypeError: Argument 1 passed to WP2FA\Admin\User::setUserStatus() must be an instance of WP_User, null given, called in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php on line 430 and defined in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php:455
    Stack trace:
    #0 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(430): WP2FA\Admin\User::setUserStatus(NULL)
    #1 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(60): WP2FA\Admin\User->setUserPoliciesAndGrace()
    #2 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Cron/CronTasks.php(50): WP2FA\Admin\User->__construct('3843')
    #3 [snipped-path]/wp-includes/class-wp-hook.php(292): WP2FA\Cron\CronTasks->wp_2fa_check_users_grace_period_status()
    #4 [snipped-path]/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php on line 455
    Fatal error: Uncaught TypeError: Argument 1 passed to WP2FA\Admin\User::setUserStatus() must be an instance of WP_User, null given, called in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php on line 430 and defined in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php:455
    Stack trace:
    #0 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(430): WP2FA\Admin\User::setUserStatus(NULL)
    #1 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php(60): WP2FA\Admin\User->setUserPoliciesAndGrace()
    #2 [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Cron/CronTasks.php(50): WP2FA\Admin\User->__construct('3843')
    #3 [snipped-path]/wp-includes/class-wp-hook.php(292): WP2FA\Cron\CronTasks->wp_2fa_check_users_grace_period_status()
    #4 [snipped-path]/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', in [snipped-path]/wp-content/plugins/wp-2fa/includes/classes/Admin/User.php on line 455
    Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.
Viewing 4 replies - 1 through 4 (of 4 total)
  • I had a similar problem.

    Error message: Uncaught Error: Class 'WP2FA\BackgroundProcessing\Enforce2FA' not found in...

    Took our site down that uses the wp 2fa plugin.

    Deactivated the plugin using wp cli (as I couldn’t log in) and now the site works fine.

    Tried reactivating plugin but this immediately puts the site into critical error mode.

    I updated this plugin yesterday morning and the site was fine (we monitor sites with Uptime Robot) but at 1am in the morning (BST) the site went down. Maybe running a scheduled task?

    Plugin Contributor robertabela

    (@robert681)

    Hello @silverks

    Thank you for posting this issue and for using our plugin. We are looking into it and will get back to you as soon as we have any update.

    @shrff your issue is totally different and unrelated. Please open a new forum thread to report your problem. Thank you for your understanding.

    Plugin Support Danny Jones

    (@distinctivepixels)

    Hi there @silverks,

    We have created a patched version which we will be releasing very soon, in the meantime you can download it freely here https://wpwhitesecurity.com/downloads/support/wp-2fa-171-preview.zip

    It should eliminate the bug straight away, however if you do continue to notice any problems when using it do be sure to let us know.

    Kind regards, Daniel @ WP White Security

    Thread Starter silverks

    (@silverks)

    Thanks @distinctivepixels . I’ve installed the preview version and will report back here if there’s any further error messages.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP fatal error during WP Cron after update 1.7.0’ is closed to new replies.