[wp-trac] [WordPress Trac] #23474: wp_update_post returns incorrect WP_Error on invalid ID (if $wp_error is set)

WordPress Trac noreply at wordpress.org
Thu Feb 14 12:28:41 UTC 2013


#23474: wp_update_post returns incorrect WP_Error on invalid ID (if $wp_error is
set)
------------------------------------+------------------------------
 Reporter:  simonwheatley           |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  General                 |     Version:  3.5
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------------------

Comment (by simonwheatley):

 Patch `#23474.diff` modifies `wp_update_post` to return `0` if the
 `$wp_error` param is false, and to return a `WP_Error` object with an
 appropriate message and code otherwise.

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


More information about the wp-trac mailing list