diff --git a/src/wp-includes/class-wp-query.php b/src/wp-includes/class-wp-query.php
index 0f29f1f3a3..1d99403eb2 100644
a
|
b
|
class WP_Query { |
2087 | 2087 | } |
2088 | 2088 | |
2089 | 2089 | // Parameters related to 'post_name'. |
2090 | | if ( '' !== $q['name'] ) { |
2091 | | $q['name'] = sanitize_title_for_query( $q['name'] ); |
| 2090 | if ( '' !== sanitize_title_for_query( $q['name'] ) ) { |
2092 | 2091 | $where .= " AND {$wpdb->posts}.post_name = '" . $q['name'] . "'"; |
2093 | 2092 | } elseif ( '' !== $q['pagename'] ) { |
2094 | 2093 | if ( isset( $this->queried_object_id ) ) { |