[wp-trac] [WordPress Trac] #34723: Warning in get_the_terms() because of non-array
WordPress Trac
noreply at wordpress.org
Wed Jan 6 07:27:24 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):
Doesn't it make more sense to just check for an array type before calling
`array_map` (instead of checking for `WP_Error`)?
Theoretically, it will always be an array or WP_Error at that point but we
should be coding for the future, right? :)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34723#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list