Ticket #12212: query.php.diff
| File query.php.diff, 933 bytes (added by , 16 years ago) |
|---|
-
wp-includes/query.php
1192 1192 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and'); 1193 1193 1194 1194 foreach ( $array_keys as $key ) { 1195 if ( !isset($array[$key])) 1195 if ( !isset($array[$key])) { 1196 if ( $key == 'post__in' ) continue; 1196 1197 $array[$key] = array(); 1198 } 1197 1199 } 1198 1200 return $array; 1199 1201 } … … 1720 1722 // If a post number is specified, load that post 1721 1723 if ( $q['p'] ) { 1722 1724 $where .= " AND {$wpdb->posts}.ID = " . $q['p']; 1725 } elseif ( is_array($q['post__in']) && empty($q['post__in']) ) { 1726 $where = " AND {$wpdb->posts}.ID = NULL"; 1727 $this->set_404(); 1723 1728 } elseif ( $q['post__in'] ) { 1724 1729 $post__in = implode(',', array_map( 'absint', $q['post__in'] )); 1725 1730 $where .= " AND {$wpdb->posts}.ID IN ($post__in)";