[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
Tue Feb 8 11:05:36 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:
Component:  Taxonomy           |     Version:  3.0.4
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+-----------------------
Changes (by hakre):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Replying to [comment:3 sparkweb]:
 > I was passing in $term->term_id. When I switched to (int)$term->term_id
 that worked.

 Thanks for the feedback, but I think `$term->term_id` should have been
 already casted to int, so normally for ID values there should be no need
 at all to cast them into integers prior further use.

 Can you say where it originated from? Was the `$term` object returned by
 some API function? If yes please name it and provide some additional code
 so it's clear how you recieved it.

 This still might be an issue with core.

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


More information about the wp-trac mailing list