mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-11 10:59:07 +01:00
Allow post_parent=0 queries to work. props stefano.verna. fixes #8085
git-svn-id: http://svn.automattic.com/wordpress/trunk@9774 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cad8e31e39
commit
502707fa29
@ -1726,7 +1726,7 @@ class WP_Query {
|
||||
$where .= " AND {$wpdb->posts}.ID NOT IN ($post__not_in)";
|
||||
}
|
||||
|
||||
if ( $q['post_parent'] )
|
||||
if ( is_integer($q['post_parent']) )
|
||||
$where .= $wpdb->prepare( " AND $wpdb->posts.post_parent = %d ", $q['post_parent'] );
|
||||
|
||||
if ( $q['page_id'] ) {
|
||||
|
Loading…
Reference in New Issue
Block a user