[wp-trac] [WordPress Trac] #63975: wp_delete_auto_drafts passes post type as string instead of as int

WordPress Trac noreply at wordpress.org
Tue Sep 16 03:03:14 UTC 2025


#63975: wp_delete_auto_drafts passes post type as string instead of as int
-----------------------------------------+------------------------------
 Reporter:  kkmuffme                     |       Owner:  kkmuffme
     Type:  defect (bug)                 |      Status:  assigned
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Posts, Post Types            |     Version:  3.4
 Severity:  trivial                      |  Resolution:
 Keywords:  has-patch changes-requested  |     Focuses:
-----------------------------------------+------------------------------

Comment (by westonruter):

 Is casting to an `int` correct? When it is a string, what value does it
 have? If it isn't an `int` then it should just be skipped rather than
 attempting to delete a post with the ID of `0`.

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


More information about the wp-trac mailing list