Prevent a PHP notice when POSTing to `wp-login.php?action=register` without a `user_login` or `user_email` field in the POST request.
Fixes #34192 Built from https://develop.svn.wordpress.org/trunk@34910 git-svn-id: http://core.svn.wordpress.org/trunk@34875 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2d745fabe3
commit
471752f59a
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-34909';
|
||||
$wp_version = '4.4-alpha-34910';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
|
@ -733,8 +733,8 @@ case 'register' :
|
|||
$user_login = '';
|
||||
$user_email = '';
|
||||
if ( $http_post ) {
|
||||
$user_login = $_POST['user_login'];
|
||||
$user_email = $_POST['user_email'];
|
||||
$user_login = isset( $_POST['user_login'] ) ? $_POST['user_login'] : '';
|
||||
$user_email = isset( $_POST['user_email'] ) ? $_POST['user_email'] : '';
|
||||
$errors = register_new_user($user_login, $user_email);
|
||||
if ( !is_wp_error($errors) ) {
|
||||
$redirect_to = !empty( $_POST['redirect_to'] ) ? $_POST['redirect_to'] : 'wp-login.php?checkemail=registered';
|
||||
|
|
Loading…
Reference in New Issue