Use prepare() in get_comments()
git-svn-id: http://svn.automattic.com/wordpress/trunk@9601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
10f9e61ae2
commit
8d544355df
|
@ -227,7 +227,7 @@ function get_comments( $args = '' ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! empty($post_id) )
|
if ( ! empty($post_id) )
|
||||||
$post_where = "comment_post_ID = $post_id AND";
|
$post_where = $wpdb->prepare( 'comment_post_ID = %d AND', $post_id );
|
||||||
else
|
else
|
||||||
$post_where = '';
|
$post_where = '';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue