diff --git a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php index 8f540789c6..52e8fcf0cd 100644 --- a/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php +++ b/src/wp-includes/rest-api/endpoints/class-wp-rest-users-controller.php @@ -725,7 +725,10 @@ class WP_REST_Users_Controller extends WP_REST_Controller { ); } - $owner_id = email_exists( $request['email'] ); + $owner_id = false; + if ( is_string( $request['email'] ) ) { + $owner_id = email_exists( $request['email'] ); + } if ( $owner_id && $owner_id !== $id ) { return new WP_Error(