Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#48854 closed enhancement (invalid)

WP_Query unused code

Reported by: mostafaabd's profile mostafaabd Owned by:
Milestone: Priority: normal
Severity: normal Version: 5.3
Component: Query Keywords:
Focuses: Cc:


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)

#1 @mostafaabd
4 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#2 @SergeyBiryukov
4 years ago

  • Component changed from Database to Query
  • Focuses performance removed
  • Milestone Awaiting Review deleted

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.

#3 @mostafaabd
4 years ago

thanks , I try to close this ticket before you answer but I think I am failure.

Note: See TracTickets for help on using tickets.