-
Notifications
You must be signed in to change notification settings - Fork 168
Closed
Description
Describe the bug
PHP 8.4 deprecated marking a parameter as nullable. For sites running Two Factor a PHP error shows up in the logs:
u2flib_server\Error::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead
Stacktrace
wp-content/plugins/two-factor/includes/Yubico/U2F.php:504
Two_Factor_FIDO_U2F->__construct()
wp-content/plugins/two-factor/providers/class-two-factor-provider.php:28
Two_Factor_Provider::get_instance()
wp-content/plugins/two-factor/class-two-factor-core.php:291
Two_Factor_Core::get_providers()
wp-includes/class-wp-hook.php:324
do_action('init')
wp-settings.php:704
Steps to Reproduce
- Install PHP 8.4, Two Factor and optionally Query Monitor but ensure that logging is enabled
- Notice the warning in the logs
Screenshots, screen recording, code snippet
No response
Environment information
PHP 8.4.2
WordPress 6.7.2
Please confirm that you have searched existing issues in this repository.
Yes
Please confirm that you have tested with all plugins deactivated except Two-Factor.
Yes
Metadata
Metadata
Assignees
Labels
No labels