[wp-trac] [WordPress Trac] #13904: wp_get_single_post and wp_update_post assume post properties

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 15 16:01:02 UTC 2010


#13904: wp_get_single_post and wp_update_post assume post properties
--------------------------+-------------------------------------------------
 Reporter:  filosofo      |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0.1    
Component:  Post Types    |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 `wp_update_post` and `wp_get_single_post` assume both that the post object
 they try to retrieve exists and that it has certain properties.

 Theses assumptions do not always hold true, as sometimes, for example one
 can pass arguments to `wp_update_post` to create a new post object.

 Patch does sanity checks for post object properties.

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


More information about the wp-trac mailing list