Make WordPress Core


Ignore:
Timestamp:
03/22/2010 04:06:55 PM (12 years ago)
Author:
nacin
Message:

Fix notice without breaking comment notifications. See r13150, see #11830

File:
1 edited

Legend:

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

    r13513 r13801  
    12751275        $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
    12761276
    1277         if ( isset( $commentdata['user_id'] ) && get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_id'] )
     1277        if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
    12781278            wp_notify_postauthor($comment_ID, $commentdata['comment_type']);
    12791279    }
Note: See TracChangeset for help on using the changeset viewer.