[wp-trac] [WordPress Trac] #14590: get_queried_object_id does not return an int for taxonomy terms

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 11 16:33:41 UTC 2010


#14590: get_queried_object_id does not return an int for taxonomy terms
--------------------------+-------------------------------------------------
 Reporter:  GamajoTech    |       Owner:                              
     Type:  defect (bug)  |      Status:  new                         
 Priority:  normal        |   Milestone:  Awaiting Review             
Component:  Taxonomy      |     Version:  3.0.1                       
 Severity:  normal        |    Keywords:  taxonomy, get_queried_object
--------------------------+-------------------------------------------------
 The docblock for get_queried_object_id() claims it returns as an integer.
 However, when the queried object is such that is_tax() as true, it's
 returned as a string.

 The following line (currently line 2739 of wp-includes/query.php in WP
 3.0.1) needs changing within get_queried_object() from:

 $this->queried_object_id = $term->term_id;

 to

 $this->queried_object_id = (int) $term->term_id;

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14590>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list