From 61280672d28c03bca0d27979ff25ddb968665c46 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Wed, 7 Oct 2015 14:42:39 +0000 Subject: [PATCH] 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 git-svn-id: https://develop.svn.wordpress.org/trunk@34910 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-login.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-login.php b/src/wp-login.php index 350363dabe..83eefe7239 100644 --- a/src/wp-login.php +++ b/src/wp-login.php @@ -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';