[wp-trac] [WordPress Trac] #20904: WP_Query instances getting entangled with $wp_query global

WordPress Trac noreply at wordpress.org
Thu Dec 12 21:26:55 UTC 2013


#20904: WP_Query instances getting entangled with $wp_query global
---------------------------------+-----------------------------
 Reporter:  boonebgorges         |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Future Release
Component:  Query                |     Version:
 Severity:  normal               |  Resolution:
 Keywords:  has-patch 3.9-early  |
---------------------------------+-----------------------------

Comment (by boonebgorges):

 > While it allows WP_Query to be used before init, I'm not sure allowing
 this is actually desirable.

 Fair enough, but the point about pre-init is just to give a particularly
 striking instance of the problem. After init, the leakiness is still
 there, but doesn't throw any notices, and so goes unnoticed.

 > given it more or less works fine as-is.

 In WP, yes, but there are probably others that are attempting things that
 ought to be legit (however "crazy") but run into problems because the
 objects aren't encapsulated. 20904.2.diff is a very modest way of fixing
 it. If it could be rolled into a larger overhaul of the way post globals
 work, that'd be excellent, but if that doesn't end up happening in 3.9, I
 think this more conservative patch is worth considering.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/20904#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list