diff --git a/wp-includes/comment.php b/wp-includes/comment.php index cbe8bba4f..7fcfab509 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -1274,7 +1274,7 @@ function wp_new_comment( $commentdata ) { $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment - if ( isset( $commentdata['user_id'] ) && get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_id'] ) + if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) ) wp_notify_postauthor($comment_ID, $commentdata['comment_type']); }