From 8d544355df177c1574efeeccd9b53bcc877e2608 Mon Sep 17 00:00:00 2001 From: markjaquith Date: Mon, 10 Nov 2008 22:16:50 +0000 Subject: [PATCH] Use prepare() in get_comments() git-svn-id: http://svn.automattic.com/wordpress/trunk@9601 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 85c0af926e..2e9e205ba2 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -227,7 +227,7 @@ function get_comments( $args = '' ) { } if ( ! empty($post_id) ) - $post_where = "comment_post_ID = $post_id AND"; + $post_where = $wpdb->prepare( 'comment_post_ID = %d AND', $post_id ); else $post_where = '';