mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-16 23:00:21 +00:00
General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov. Fixes #42742. git-svn-id: https://develop.svn.wordpress.org/trunk@42761 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2469,7 +2469,7 @@ function register_new_user( $user_login, $user_email ) {
|
||||
*/
|
||||
$errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
|
||||
|
||||
if ( $errors->get_error_code() ) {
|
||||
if ( $errors->has_errors() ) {
|
||||
return $errors;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user