Make WordPress Core


Ignore:
Timestamp:
05/14/2017 04:19:51 AM (8 years ago)
Author:
rachelbaker
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment.php

    r40664 r40667  
    30663066
    30673067    if ( get_option( 'require_name_email' ) && ! $user->exists() ) {
    3068         if ( 6 > strlen( $comment_author_email ) || '' == $comment_author ) {
     3068        if ( '' == $comment_author_email || '' == $comment_author ) {
    30693069            return new WP_Error( 'require_name_email', __( '<strong>ERROR</strong>: please fill the required fields (name, email).' ), 200 );
    30703070        } elseif ( ! is_email( $comment_author_email ) ) {
Note: See TracChangeset for help on using the changeset viewer.