[wp-trac] [WordPress Trac] #5372: Wrong category on post insertion

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 20 21:41:36 GMT 2007


#5372: Wrong category on post insertion
---------------------+------------------------------------------------------
 Reporter:  malaiac  |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.5      
Component:  General  |     Version:           
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 in wp-includes/taxonomy.php

 function = wp_set_object_terms

 around lines 1013,1014

 <?php

 $term_ids[] = $id['term_id'];

 $id = $id['term_taxonomy_id'];

 ?>

 bug : when $id is not an array, it resets $id to 1 (i can't figure why)...
 and the post is assigned to the wrong (1) category, instead of the legit
 category.

 Happens when the post category is new (has just been created)

 Found when doing a custom import

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


More information about the wp-trac mailing list