Use prepare() in get_comments()
git-svn-id: https://develop.svn.wordpress.org/trunk@9601 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a26f21e992
commit
eef5445e38
|
@ -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 = '';
|
||||
|
||||
|
|
Loading…
Reference in New Issue