General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov. Fixes #42742. Built from https://develop.svn.wordpress.org/trunk@42761 git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -160,7 +160,7 @@ Please click the following link to confirm the invite:
|
||||
// Adding a new user to this site
|
||||
$new_user_email = wp_unslash( $_REQUEST['email'] );
|
||||
$user_details = wpmu_validate_user_signup( $_REQUEST['user_login'], $new_user_email );
|
||||
if ( is_wp_error( $user_details['errors'] ) && ! empty( $user_details['errors']->errors ) ) {
|
||||
if ( is_wp_error( $user_details['errors'] ) && $user_details['errors']->has_errors() ) {
|
||||
$add_user_errors = $user_details['errors'];
|
||||
} else {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user