[wp-trac] [WordPress Trac] #31246: Notice: Undefined offset: 0 in wp-includes/query.php on line 3877

WordPress Trac noreply at wordpress.org
Sat Feb 7 19:49:18 UTC 2015


#31246: Notice: Undefined offset: 0 in wp-includes/query.php on line 3877
----------------------------+---------------------------
 Reporter:  Mediastuttgart  |       Owner:  boonebgorges
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  4.1.1
Component:  Query           |     Version:  4.1
 Severity:  trivial         |  Resolution:  fixed
 Keywords:                  |     Focuses:
----------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"31366"]:
 {{{
 #!CommitTicketReference repository="" revision="31366"
 In `WP_Query::get_queried_object()`, avoid PHP notices when `is_tax` is
 paired with an empty `tax_query`.

 It's possible to have an empty `tax_query` and `is_tax=true` when the
 initial
 query contains a taxonomy var (and is processed as such during
 `WP_Query::parse_query()`) but the taxonomy var is unset during a
 'parse_query'
 callback. While this kind of behavior is not necessarily something we need
 to
 support, we should continue to avoid PHP notices in such cases, as we did
 prior
 to WP 4.1.

 Fixes #31246.
 }}}

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


More information about the wp-trac mailing list