Ticket #13020: 13020.diff

File 13020.diff, 586 bytes (added by michaelh, 3 years ago)

Otto identified what caused the problem. Dougal Campbell suggested the solution.

Line 
1Index: wp-includes/query.php
2===================================================================
3--- wp-includes/query.php       (revision 14097)
4+++ wp-includes/query.php       (working copy)
5@@ -2031,7 +2031,9 @@
6                                $post_ids = get_objects_in_term($term_ids, $taxonomy);
7                                if ( !is_wp_error($post_ids) && !empty($post_ids) ) {
8                                        $whichcat .= " AND $wpdb->posts.ID IN (" . implode(', ', $post_ids) . ") ";
9-                                       $post_type = 'any';
10+                                       if ( '' === $post_type ) {
11+                                               $post_type = 'any';
12+                                       }
13                                        $q['post_status'] = 'publish';
14                                        $post_status_join = true;
15                                } else {