Changeset 42761 for trunk/src/wp-login.php
- Timestamp:
- 02/27/2018 02:30:46 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-login.php
r42406 r42761 54 54 $shake_error_codes = apply_filters( 'shake_error_codes', $shake_error_codes ); 55 55 56 if ( $shake_error_codes && $wp_error-> get_error_code() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) {56 if ( $shake_error_codes && $wp_error->has_errors() && in_array( $wp_error->get_error_code(), $shake_error_codes ) ) { 57 57 add_action( 'login_head', 'wp_shake_js', 12 ); 58 58 } … … 209 209 } 210 210 211 if ( $wp_error-> get_error_code() ) {211 if ( $wp_error->has_errors() ) { 212 212 $errors = ''; 213 213 $messages = ''; … … 342 342 do_action( 'lostpassword_post', $errors ); 343 343 344 if ( $errors-> get_error_code() ) {344 if ( $errors->has_errors() ) { 345 345 return $errors; 346 346 } … … 688 688 do_action( 'validate_password_reset', $errors, $user ); 689 689 690 if ( ( ! $errors-> get_error_code() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) {690 if ( ( ! $errors->has_errors() ) && isset( $_POST['pass1'] ) && ! empty( $_POST['pass1'] ) ) { 691 691 reset_password( $user, $_POST['pass1'] ); 692 692 setcookie( $rp_cookie, ' ', time() - YEAR_IN_SECONDS, $rp_path, COOKIE_DOMAIN, is_ssl(), true ); … … 974 974 975 975 if ( $interim_login ) { 976 if ( ! $errors-> get_error_code() ) {976 if ( ! $errors->has_errors() ) { 977 977 $errors->add( 'expired', __( 'Your session has expired. Please log in to continue where you left off.' ), 'message' ); 978 978 } … … 1016 1016 $rememberme = ! empty( $_POST['rememberme'] ); 1017 1017 1018 if ( ! empty( $errors->errors) ) {1018 if ( $errors->has_errors() ) { 1019 1019 $aria_describedby_error = ' aria-describedby="login_error"'; 1020 1020 } else {
Note: See TracChangeset
for help on using the changeset viewer.