[wp-trac] [WordPress Trac] #37441: get_default_post_to_edit() function is broken

WordPress Trac noreply at wordpress.org
Tue Sep 2 16:48:50 UTC 2025


#37441: get_default_post_to_edit() function is broken
-------------------------------------------------+-------------------------
 Reporter:  tfrommen                             |       Owner:  rishabhwp
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.9
Component:  Posts, Post Types                    |     Version:  5.6
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-test-info good-first-bug has-    |     Focuses:
  patch has-unit-tests needs-testing             |  administration
-------------------------------------------------+-------------------------
Changes (by SergeyBiryukov):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"60701" 60701]:
 {{{
 #!CommitTicketReference repository="" revision="60701"
 Posts, Post Types: Check the result of creating a draft in
 `get_default_post_to_edit()`.

 As `wp_insert_post()` can return an error for various reasons, this commit
 ensures that this scenario is properly handled and an error message is
 displayed.

 Follow-up to [12987].

 Props rishabhwp, tfrommen, SirLouen, siliconforks, SergeyBiryukov.
 Fixes #37441.
 }}}

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


More information about the wp-trac mailing list