Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#27312 closed defect (bug) (fixed)

get_term_children() has incorrect @return value

Reported by: SergeyBiryukov Owned by: wonderboymusic
Milestone: 3.9 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: needs-patch good-first-bug
Focuses: docs Cc:


See tags/3.8.1/src/wp-includes/taxonomy.php#L1071.

It returns an array of term IDs, not term objects.

Change History (3)

#1 @wonderboymusic
4 years ago

It's primary (and really only use) is in WP_Tax_Query::clean_query() to populate the terms property with term_id array

#2 @wonderboymusic
4 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 27457:

get_term_children() returns an array of IDs, not objects. The docs have been updated to reflect this.

Fixes #27312.

This ticket was mentioned in IRC in #wordpress-dev by SergeyBiryukov. View the logs.

4 years ago

Note: See TracTickets for help on using tickets.