From 5bc59586dacf3d896a938706b423691166734d98 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Tue, 6 May 2014 21:43:20 +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. Built from https://develop.svn.wordpress.org/trunk@28333 git-svn-id: http://core.svn.wordpress.org/trunk@28161 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/query.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/wp-includes/query.php b/wp-includes/query.php index fcaac1008f..b47ad14546 100644 --- a/wp-includes/query.php +++ b/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;