From 76915903e39984f3081d625cffda6516d3ff3aab Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Mon, 7 Nov 2005 08:58:37 +0000 Subject: [PATCH] Missing user line. git-svn-id: https://develop.svn.wordpress.org/trunk@3004 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/pluggable-functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-includes/pluggable-functions.php b/wp-includes/pluggable-functions.php index e88b272757..7c81359b82 100644 --- a/wp-includes/pluggable-functions.php +++ b/wp-includes/pluggable-functions.php @@ -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