[wp-trac] [WordPress Trac] #48854: WP_Query unused code

WordPress Trac noreply at wordpress.org
Mon Dec 2 19:00:43 UTC 2019


#48854: WP_Query unused code
-------------------------+-----------------------------
 Reporter:  mostafaabd   |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  5.3
 Severity:  normal       |   Keywords:
  Focuses:  performance  |
-------------------------+-----------------------------
 https://core.trac.wordpress.org/browser/tags/5.3/src/wp-includes/class-wp-
 query.php#L3411

 inside function query on line 3411
 $this->query      = wp_parse_args( $query );

 I think wp_parse_args take 2 arguments to Merge a user defined arguments
 into defaults array.
 but here we only path one parameter
 so I think its good to remove this function to be
 $this->query      = $query;

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48854>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list