Fix notice in wp_new_comment(). fixes #10854.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
40a8e989e1
commit
fc7dbbcc3e
|
@ -1275,7 +1275,7 @@ function wp_new_comment( $commentdata ) {
|
||||||
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
$post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment
|
||||||
|
|
||||||
if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $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']);
|
wp_notify_postauthor($comment_ID, empty( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' );
|
||||||
}
|
}
|
||||||
|
|
||||||
return $comment_ID;
|
return $comment_ID;
|
||||||
|
|
Loading…
Reference in New Issue