[wp-trac] [WordPress Trac] #47773: wp_trash_post() ignores errors from wp_update_post()

WordPress Trac noreply at wordpress.org
Sat Jul 27 09:11:38 UTC 2019


#47773: wp_trash_post() ignores errors from wp_update_post()
-------------------------------+-----------------------------
 Reporter:  siliconforks       |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Future Release
Component:  Posts, Post Types  |     Version:  5.2.2
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:
-------------------------------+-----------------------------

Comment (by abhijitrakas):

 @manzoorwanijk No need to pass the second parameter as it's the default
 param in `wp_update_post` function.

 For `wp_trash_post_comments` we can't stop the process. If we return
 `false` on fail of `wp_trash_post_comments` function, then the user might
 get confused as we return an error but the post is not there in the list
 as post status already changed.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47773#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list