mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
Formatting: Increase minimum characters allowed in is_email() to 6.
Brings the minimum characters expected for a valid email address to six, which matches the expectations in `wp_handle_comment_submission()` and REST API email arguments. Props rmccue, lukecavanagh, rachelbaker, desrosj, sudar. Fixes #38708. git-svn-id: https://develop.svn.wordpress.org/trunk@40667 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3065,7 +3065,7 @@ function wp_handle_comment_submission( $comment_data ) {
|
||||
$comment_type = '';
|
||||
|
||||
if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
|
||||
if ( 6 > strlen( $comment_author_email ) || '' == $comment_author ) {
|
||||
if ( '' == $comment_author_email || '' == $comment_author ) {
|
||||
return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
|
||||
} elseif ( ! is_email( $comment_author_email ) ) {
|
||||
return new WP_Error( 'require_valid_email', __( '<strong>ERROR</strong>: please enter a valid email address.' ), 200 );
|
||||
|
||||
Reference in New Issue
Block a user