[wp-trac] [WordPress Trac] #34723: Warning in get_the_terms() because of non-array
WordPress Trac
noreply at wordpress.org
Wed Jan 6 07:47:51 UTC 2016
#34723: Warning in get_the_terms() because of non-array
-----------------------------------+---------------------------
Reporter: mrppp | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.4.1
Component: Taxonomy | Version: 4.4
Severity: normal | Resolution: fixed
Keywords: fixed-major has-patch | Focuses:
-----------------------------------+---------------------------
Comment (by DvanKooten):
Oops. I messed up that previous patch - how do I remove it?
After looking at this a bit more, it seems to make sense to perform
stricter checking in the other places as well. We really only want to
update the cache & map each term if we got an array so the attached patch
should make more sense.
The code can be a lot simpler if the `WP_Error` object doesn't need to run
through the `get_the_terms` filter. Any reason you want to do this
@swisspidy?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34723#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list