Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#30623 closed defect (bug) (fixed)

WP_Tax_Query + WP_Query::get_queried_object() fatal

Reported by: dd32's profile dd32 Owned by: boonebgorges's profile boonebgorges
Milestone: 4.1 Priority: normal
Severity: major Version: 4.1
Component: Taxonomy Keywords:
Focuses: Cc:

Description

Seeing a Fatal error in get_queried_object related to the new nested taxonomy queries.

Haven't had a chance to fully investigate it, but attaching a unit test that hits the failure point.

Warning: Illegal string offset 'terms' in wp-includes/query.php on line 3875
Warning: Illegal string offset 'field' in wp-includes/query.php on line 3876
Fatal error: Only variables can be passed by reference in wp-includes/query.php on line 3879

Attachments (1)

30623-broken-ut.diff (1.9 KB) - added by dd32 9 years ago.

Download all attachments as: .zip

Change History (4)

@dd32
9 years ago

This ticket was mentioned in Slack in #core by dd32. View the logs.


9 years ago

#2 @boonebgorges
9 years ago

  • Owner set to boonebgorges
  • Status changed from new to accepted

This is a similar issue to the one solved in [29901]. I will write a more focused test and patch it up.

#3 @boonebgorges
9 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 30771:

In WP_Query::get_queried_object(), use the new format for referencing tax query clauses.

queried_terms, rather than queries, is the tax_query property where a flat
index of terms is stored.

See [29901] for a similar fix in redirect_canonical(). See #29738.

Props dd32.
Fixes #30623.

Note: See TracTickets for help on using tickets.