Missing user line.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2005-11-07 08:58:37 +00:00
parent b1cdba1f31
commit 5b1a7b5ed0
1 changed files with 2 additions and 1 deletions

View File

@ -240,7 +240,8 @@ function wp_notify_postauthor($comment_id, $comment_type='') {
global $wpdb;
$comment = $wpdb->get_row("SELECT * FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID='$comment->comment_post_ID' LIMIT 1");
$post = $wpdb->get_row("SELECT * FROM $wpdb->posts WHERE ID = '$comment->comment_post_ID' LIMIT 1");
$user = get_userdata( $post->post_author );
if ('' == $user->user_email) return false; // If there's no email to send the comment to