WordPress.org

Make WordPress Core

Ticket #34954: 34954.patch

File 34954.patch, 499 bytes (added by subharanjan, 4 years ago)
  • wp-includes/comment.php

     
    19041904        }
    19051905
    19061906        // Make sure that the comment post ID is valid (if specified).
    1907         if ( isset( $commentarr['comment_post_ID'] ) && ! get_post( $commentarr['comment_post_ID'] ) ) {
     1907        if ( ! empty( $commentarr['comment_post_ID'] ) && ! get_post( $commentarr['comment_post_ID'] ) ) {
    19081908                return 0;
    19091909        }
    19101910