[wp-trac] [WordPress Trac] #51864: set_object_terms hook $tt_ids arg issue
WordPress Trac
noreply at wordpress.org
Tue Nov 24 13:57:28 UTC 2020
#51864: set_object_terms hook $tt_ids arg issue
--------------------------+-----------------------------
Reporter: szaqal21 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 5.5.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
$tt_ids arg passed to set_object_terms hook contains ids as strings not
ints like $old_tt_ids arg, is it intended behaviour?
Without this:
{{{
$tt_ids = array_map('absint', $tt_ids);
}}}
calling for example:
{{{
$terms = get_terms(array('term_taxonomy_id' => $tt_ids));
}}}
in set_object_terms hook without mapping those ids to ints, gives
unexpected results.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51864>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list