mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 04:34:31 +00:00
Upgrade/Install: Avoid creating nonce during installation.
This avoids a "Table `wp_options` doesn't exist" database error when trying to create a nonce for password reset button. When installing and using database-saved salts, `wp_create_nonce()` causes database errors as `wp_salt()` attempts to insert into the not-yet-created options table. Since authentication is not available during installation, we can safely skip creating a nonce. Follow-up to [39684], [50129]. Props schlessera, swissspidy, sanketchodavadiya, hellofromTonya, SergeyBiryukov. Fixes #53830. git-svn-id: https://develop.svn.wordpress.org/trunk@51525 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1097,7 +1097,7 @@ function wp_default_scripts( $scripts ) {
|
||||
'userProfileL10n',
|
||||
array(
|
||||
'user_id' => $user_id,
|
||||
'nonce' => wp_create_nonce( 'reset-password-for-' . $user_id ),
|
||||
'nonce' => ( wp_installing() && ! is_multisite() ) ? '' : wp_create_nonce( 'reset-password-for-' . $user_id ),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user