[wp-trac] [WordPress Trac] #26570: wp_set_object_terms - bug
WordPress Trac
noreply at wordpress.org
Fri Dec 13 12:23:33 UTC 2013
#26570: wp_set_object_terms - bug
----------------------------+------------------------------
Reporter: stiofansisland | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Inline Docs | Version: 2.3
Severity: normal | Resolution:
Keywords: |
----------------------------+------------------------------
Comment (by stiofansisland):
Replying to [comment:1 helen]:
> Actually, hierarchical taxonomies need the ID, non-hierarchical expect
the slug. Sounds like the inline docs need an update, though.
OK i went and did some digging and found the root of the problem, function
term_exists checks the term to see if it's an int or a slug, the problem
is it uses "is_int" which being that the majority of people using this
function in the wild will be posting the term value is_int sees any POST
value as a string so it then moves on to query the ID as a term which
breaks.
I propose to fix this we change taxonomy.php line: 1570
FROM:
{{{
if ( is_int($term) ) {
}}}
TO:
{{{
if ( is_numeric($term) ) {
}}}
Thanks,
Stiofan
--
Ticket URL: <http://core.trac.wordpress.org/ticket/26570#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list