[wp-trac] [WordPress Trac] #63975: wp_delete_auto_drafts passes post type as string instead of as int
WordPress Trac
noreply at wordpress.org
Mon Sep 15 13:39:24 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 kkmuffme):
I got this by adding `declare( strict_types=1 );` on top of wp-includes
/class-wp-hook.php to debug an issue where a plugin used native type hints
and accidentally broke a "pre" hook
Anyway, while debugging, cron suddenly report a fatal TypeError for a
method with type hint "int" on the delete action, since it received a
string, even though it expected an int.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63975#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list