[wp-trac] [WordPress Trac] #20462: Shouldn't have to pass 'post_category' to wp_update_post()

WordPress Trac wp-trac at lists.automattic.com
Thu Sep 13 05:37:26 UTC 2012


#20462: Shouldn't have to pass 'post_category' to wp_update_post()
--------------------------+------------------
 Reporter:  scribu        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  3.5
Component:  General       |     Version:
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------
Changes (by wonderboymusic):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => 3.5


Comment:

 Your last example causes:

 {{{
 Warning: array_merge(): Argument #1 is not an array in /Users/scott/Sites
 /wordpress-core/wp-includes/post.php on line 2835
 }}}

 ...because {{{get_post()}}} fails on an ID of 0. I simplified your patch
 and added validation for the ID.

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


More information about the wp-trac mailing list