[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
Sat Jun 4 02:52:18 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: reopened
Priority: normal | Milestone: 4.6
Component: Taxonomy | Version: trunk
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+---------------------------
Changes (by boonebgorges):
* keywords: => reporter-feedback
Comment:
Replying to [comment:5 nathanrice]:
> FWIW, this is still somewhat broken. I've not had a chance to chase down
why, but if you use array type hinting in your callback on the `get_terms`
filter, you get the following error.
>
> `Catchable fatal error: Argument 1 passed to genesis_get_terms_filter()
must be of the type array, string given`
>
> Obviously, this is in the Genesis theme.
>
> Anybody know what's going on here? Why is a argument not of type `array`
ever being passed to the `get_terms` filter?
I just looked through again. At a glance, I don't see anywhere where
something other than an array might be passed through the filter. It would
be helpful if you could generate a full stack trace, including (a) the
args being passed to `get_terms()` and `WP_Term_Query`, and (b) the non-
array value that's being erroneously passed to the filter (is it a
`WP_Error`? a boolean? or something else?)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36992#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list