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

WordPress Trac noreply at wordpress.org
Mon Sep 1 11:43:19 UTC 2025


#37441: get_default_post_to_edit() function is broken
-------------------------------------------------+-------------------------
 Reporter:  tfrommen                             |       Owner:  rishabhwp
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Posts, Post Types                    |     Version:  5.6
 Severity:  normal                               |  Resolution:
 Keywords:  has-test-info good-first-bug has-    |     Focuses:
  patch has-unit-tests                           |  administration
-------------------------------------------------+-------------------------

Comment (by SirLouen):

 Replying to [comment:11 siliconforks]:
 > Don't you need that though?  That's the actual check to see whether the
 `wp_insert_post()` call failed.  Without that, the code is just going to
 keep running (and presumably crash at some later point).

 Last time I tested without this, it stopped execution with the error. But
 to be sincere, I did not check if it continued execution after
 [https://github.com/SirLouen/wordpress-
 develop/blob/da59c19dcaae731f64c9f512d35157e356e25931/src/wp-
 admin/includes/post.php#L774-L775 this line], so I wanted to double check.

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


More information about the wp-trac mailing list