Make WordPress Core

Opened 4 years ago

#51864 new defect (bug)

set_object_terms hook $tt_ids arg issue

Reported by: szaqal21's profile szaqal21 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.5.3
Component: Taxonomy Keywords:
Focuses: Cc:

Description

$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.

Change History (0)

Note: See TracTickets for help on using tickets.