[wp-trac] [WordPress Trac] #30009: _wp_put_post_revision checks for errors incorrectly

WordPress Trac noreply at wordpress.org
Thu Oct 16 16:23:56 UTC 2014


#30009: _wp_put_post_revision checks for errors incorrectly
--------------------------+-----------------------------
 Reporter:  rmccue        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Revisions     |    Version:  2.6
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 `_wp_put_post_revision` uses `wp_insert_post`, then checks `is_wp_error`
 to pass it up the stack
 ([https://core.trac.wordpress.org/browser/trunk/src/wp-
 includes/revision.php?r=28976#L259 lines 259-261]). However,
 `wp_insert_post` only returns a `WP_Error` if the second param is true. In
 this case, it is not.

 Introduced in r7907.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30009>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list