Ticket #39110: 39110.patch
| File 39110.patch, 1.3 KB (added by , 9 years ago) |
|---|
-
wp-login.php
42 42 $wp_error = new WP_Error(); 43 43 44 44 // Shake it! 45 $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password' );45 $shake_error_codes = array( 'empty_password', 'empty_email', 'invalid_email', 'invalidcombo', 'empty_username', 'invalid_username', 'incorrect_password', 'email_disabled' ); 46 46 /** 47 47 * Filters the error codes array for shaking the login form. 48 48 * … … 386 386 */ 387 387 $message = apply_filters( 'retrieve_password_message', $message, $key, $user_login, $user_data ); 388 388 389 if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) 390 wp_die( __('The email could not be sent.') . "<br />\n" . __('Possible reason: your host may have disabled the mail() function.') ); 391 389 if ( $message && !wp_mail( $user_email, wp_specialchars_decode( $title ), $message ) ) { 390 $errors->add('email_disabled', __('<strong>ERROR</strong>: The email could not be sent. Please check your hosting server have enabled the mail() function.') ); 391 return $errors; 392 } 393 392 394 return true; 393 395 } 394 396