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

WordPress Trac noreply at wordpress.org
Mon Sep 1 11:26:13 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):

 Hello @rishabhwp
 Looks good

 I'm not sure if this part is really necessary:
 {{{
 if ( is_wp_error( $post_id ) ) {
         wp_die( $post_id->get_error_message() );
 }
 }}}

 Have you tested with and without this part? Any differences found?

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


More information about the wp-trac mailing list