[wp-trac] [WordPress Trac] #34723: Warning in get_the_terms() because of non-array (was: WP 4.4 on test site)
WordPress Trac
noreply at wordpress.org
Wed Nov 18 11:59:31 UTC 2015
#34723: Warning in get_the_terms() because of non-array
--------------------------+------------------------------
Reporter: mrppp | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version:
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Changes (by swissspidy):
* component: General => Taxonomy
Old description:
> Using Events manager plugin
> on events i get
> When updating to 4.4 on test site, all my events disappear from calendar
> and on listing page or when viewing the event from settings/events i get
>
> {{{
>
> }}}
> Warning: array_map(): Argument #2 should be an array in
> `C:\xampp\htdocs\xxxxxxx\wp-includes\category-template.php on line 1158`
> {{{
>
> }}}
>
> is this a WP issue or events manager?
New description:
Using Events manager plugin
on events i get
When updating to 4.4 on test site, all my events disappear from calendar
and on listing page or when viewing the event from settings/events i get
{{{
Warning: array_map(): Argument #2 should be an array in
`C:\xampp\htdocs\xxxxxxx\wp-includes\category-template.php on line 1158`
}}}
is this a WP issue or events manager?
--
Comment:
Hard to tell. Have you informed the developers of that plugin? They should
test it against 4.4, especially when they would be using term meta stuff.
That line belongs to `get_the_terms()`. At first glance it looks like
either the return value of `get_object_term_cache()` or
`wp_get_object_terms()` isn't properly checked.
Especially `wp_get_object_terms()` can return a `WP_Error` when the
taxonomy does not exist. `wp_get_object_terms()` should account for that
scenario.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34723#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list