[wp-trac] [WordPress Trac] #13246: wp_set_post_categories assumes $post_categories has a value in [0], but wp_insert_post doesn't assign the default category there

WordPress Trac wp-trac at lists.automattic.com
Tue May 4 14:38:58 UTC 2010


#13246: wp_set_post_categories assumes $post_categories has a value in [0], but
wp_insert_post doesn't assign the default category there
--------------------------+-------------------------------------------------
 Reporter:  jorbin        |       Owner:  jorbin                 
     Type:  defect (bug)  |      Status:  assigned               
 Priority:  normal        |   Milestone:  3.0                    
Component:  Taxonomy      |     Version:  3.0                    
 Severity:  normal        |    Keywords:  has-patch needs-testing
--------------------------+-------------------------------------------------
Changes (by scribu):

  * keywords:  has-patch => has-patch needs-testing


Comment:

 I wasn't able to reproduce the notice. Could you provide more detailed
 steps to reproduce?

 Anyway, 14438.diff:

  * removes duplicated validation code from wp_insert_post()
  * uses reset($post_category) instead of $post_category[0]

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


More information about the wp-trac mailing list