[wp-trac] [WordPress Trac] #36992: In get_terms(), getting a fatal error iterating on $terms inside get_terms filter.

WordPress Trac noreply at wordpress.org
Thu Jun 2 14:37:58 UTC 2016


#36992: In get_terms(), getting a fatal error iterating on $terms inside get_terms
filter.
---------------------------+---------------------------
 Reporter:  JustinSainton  |       Owner:  boonebgorges
     Type:  defect (bug)   |      Status:  closed
 Priority:  normal         |   Milestone:  4.6
Component:  Taxonomy       |     Version:  trunk
 Severity:  normal         |  Resolution:  fixed
 Keywords:                 |     Focuses:
---------------------------+---------------------------
Changes (by boonebgorges):

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


Comment:

 In [changeset:"37623"]:
 {{{
 #!CommitTicketReference repository="" revision="37623"
 Taxonomy: Don't pass results of 'count' query through 'get_terms' filter.

 Use of the 'get_terms' filter was consolidated in [37572], with the
 introduction of `WP_Term_Query`. At that time, the result of 'count=true'
 queries began being filtered by 'get_terms'. This breaks existing
 'get_terms'
 callbacks, which often assume that the returned value will be an array or
 a
 `WP_Error` object.

 Props JustinSainton.
 Fixes #36992.
 }}}

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


More information about the wp-trac mailing list