Fatal error “Unknown format specifier”
-
After an update to PHP 8.0 a user got a fatal error:
[29-Nov-2022 08:05:42 UTC] PHP Fatal error: Uncaught ValueError: Unknown format specifier " " in /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/class-wp2fa.php:525 Stack trace: #0 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/class-wp2fa.php(525): sprintf('...', '...', '...') #1 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Admin/class-setup-wizard.php(569): WP2FA\WP2FA::get_wp2fa_email_templates('...') #2 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(928): WP2FA\Admin\Setup_Wizard::send_authentication_setup_email(65) #3 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(428): WP2FA\Authenticator\Login::email_authentication_page(Object(WP_User)) #4 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(326): WP2FA\Authenticator\Login::login_html(Object(WP_User), '...', '...') #5 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(169): WP2FA\Authenticator\Login::show_two_factor_login(Object(WP_User)) #6 /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/Authenticator/class-login.php(99): WP2FA\Authenticator\Login::clear_session_and_show_2fa_form(Object(WP_User)) #7 /html/wordpress/wp-includes/class-wp-hook.php(307): WP2FA\Authenticator\Login::wp_login('...', Object(WP_User)) #8 /html/wordpress/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #9 /html/wordpress/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #10 /html/wordpress/wp-includes/user.php(110): do_action('...', '...', Object(WP_User)) #11 /html/wordpress/wp-login.php(1221): wp_signon(Array, true) #12 {main} thrown in /html/wordpress/wp-content/plugins/wp-2fa/includes/classes/class-wp2fa.php on line 525
I could not replicate the problem with my own account. After a downgrade to PHP 7.4.33 the user was able again to login.
The site is part of a multisite installation
WordPress: 6.0.3
WP 2FA: 2.3.0
Custom Theme
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Fatal error “Unknown format specifier”’ is closed to new replies.