#48854 closed enhancement (invalid)
WP_Query unused code
Reported by: | mostafaabd | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.3 |
Component: | Query | Keywords: | |
Focuses: | Cc: |
Description
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;
Change History (3)
Note: See
TracTickets for help on using
tickets.
Thanks for the ticket! For clarity, since the
$query
parameter can be a string or array here,wp_parse_args()
is called to parse a string of query arguments into an array.