[wp-trac] [WordPress Trac] #35173: in_category function doesn't work after update to WP 4.4
WordPress Trac
noreply at wordpress.org
Sun Dec 20 17:26:42 UTC 2015
#35173: in_category function doesn't work after update to WP 4.4
------------------------------+-----------------------------
Reporter: artem.kolotilkin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.4
Severity: normal | Keywords:
Focuses: |
------------------------------+-----------------------------
After updating to WP 4.4 "in_category" function no longer works. I was
able to trace the issue to "is_object_in_term" function:
https://github.com/WordPress/WordPress/blob/4.4/wp-
includes/taxonomy.php#L4520
In that function "get_object_term_cache" returns empty array instead of
correct terms from cache. Because it's an empty array and not false value,
it doesn't try to load terms from DB, thus "in_category" function returns
false, although term is assigned to a post.
Downgrading to WP 4.3.1 fixes the problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35173>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list