From 098a5145c5a8134c834dcf992e71bbe34aa93302 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:42:28 +0000 Subject: [PATCH] In `WP_Query`, remove duplicate variable setting: * In `->parse_search_order()`, a value is always set for `$search_orderby`, no need for empty initialization * In `->get_posts()`, `$fields` is always set, no need for empty initialization See #27882. git-svn-id: https://develop.svn.wordpress.org/trunk@28333 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/query.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wp-includes/query.php b/src/wp-includes/query.php index fcaac1008f..b47ad14546 100644 --- a/src/wp-includes/query.php +++ b/src/wp-includes/query.php @@ -2078,8 +2078,6 @@ class WP_Query { protected function parse_search_order( &$q ) { global $wpdb; - $search_orderby = ''; - if ( $q['search_terms_count'] > 1 ) { $num_terms = count( $q['search_orderby_title'] ); $search_orderby_s = like_escape( esc_sql( $q['s'] ) ); @@ -2212,7 +2210,6 @@ class WP_Query { $join = ''; $search = ''; $groupby = ''; - $fields = ''; $post_status_join = false; $page = 1;