[wp-trac] [WordPress Trac] #16469: Cannot pass in ID for get_term_link() if using custom taxonomy

WordPress Trac wp-trac at lists.automattic.com
Mon Mar 7 04:56:55 UTC 2011


#16469: Cannot pass in ID for get_term_link() if using custom taxonomy
--------------------------+------------------------------
 Reporter:  sparkweb      |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Taxonomy      |     Version:  3.0.4
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by garyc40):

 Replying to [comment:11 dd32]:
 > is_int != is_numeric in the Term API. Theres the possibility of having
 Numeric slugs.
 >
 > The correct fix here, is to verify that ALL term objects being returned
 return the term_id as a integer, that'll fix most of these casting
 problems (ie. It may return a string '1' instead of (int)1)
 >
 > If someone passes a (string)'1' in as the term_id, they're doing it
 wrong, OR an API call is returning the data in the incorrect format.

 That makes sense. I didn't know term slug could be numeric.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/16469#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list