[wp-trac] [WordPress Trac] #63255: WP_Query normalization can break plugin filters comparing query variables.

WordPress Trac noreply at wordpress.org
Thu Apr 10 23:15:58 UTC 2025


#63255: WP_Query normalization can break plugin filters comparing query variables.
--------------------------------------+------------------------
 Reporter:  peterwilsoncc             |       Owner:  joemcgill
     Type:  defect (bug)              |      Status:  reviewing
 Priority:  normal                    |   Milestone:  6.8
Component:  Query                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+------------------------

Comment (by peterwilsoncc):

 @jeffpaul -- I've got that in the PR if it's decided to revert.

 ----

 @swissspidy @joemcgill I think the main issue is that I didn't think to
 post a dev note as I figured the change was an internal caching matter and
 didn't realise it could effect plugins.

 When I was writing tests to run against the reverted branch, I noticed
 there is a lot of standardization in the class already. As of 6.7 there
 isn't any sorting but there is plenty of type casting, removing of
 duplicates and setting values to their defaults. There is also a fair bit
 of one argument populating others (`x` populating `x__in` and `x__not_in`,
 for example).

 Given the amount of standardization in the class already, my current
 inclination is to write up a dev note rather than revert. I agree with
 @swissspidy's comment above that the array comparison I've used in the
 ticket is not great to begin with.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63255#comment:14>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list