Make WordPress Core

Ticket #42985: 42985.1.diff

File 42985.1.diff, 516 bytes (added by audrasjb, 6 years ago)

Patch refresh: display errors in wp-login.php when email and/or password fields are empty.

  • src/wp-includes/user.php

    diff --git a/src/wp-includes/user.php b/src/wp-includes/user.php
    index 5d46b42..b29976f 100644
    a b function wp_signon( $credentials = array(), $secure_cookie = '' ) { 
    9595        $user = wp_authenticate( $credentials['user_login'], $credentials['user_password'] );
    9696
    9797        if ( is_wp_error( $user ) ) {
    98                 if ( $user->get_error_codes() == array( 'empty_username', 'empty_password' ) ) {
    99                         $user = new WP_Error( '', '' );
    100                 }
    101 
    10298                return $user;
    10399        }
    104100