[wp-trac] [WordPress Trac] #22324: sanitize_post_field() forgets some integer fields

WordPress Trac noreply at wordpress.org
Sun May 31 19:19:36 UTC 2026


#22324: sanitize_post_field() forgets some integer fields
------------------------------+-----------------------------
 Reporter:  GeertDD           |       Owner:  SergeyBiryukov
     Type:  enhancement       |      Status:  closed
 Priority:  normal            |   Milestone:
Component:  General           |     Version:  3.4.2
 Severity:  minor             |  Resolution:  wontfix
 Keywords:  has-patch commit  |
------------------------------+-----------------------------

Comment (by westonruter):

 In [changeset:"62437" 62437]:
 {{{
 #!CommitTicketReference repository="" revision="62437"
 Privacy: Correct type of `WP_User_Request::$user_id` from `int` to `string
 `/`numeric-string`.

 Also adds `numeric-string` as richer PHPStan type to
 `WP_Post::$post_author` and `WP_Post::$comment_count`.

 Developed in https://github.com/WordPress/wordpress-develop/pull/12018.
 Follow-up to r25086, r43011.

 Props masteradhoc, desrosj, garrett-eclipse, johnbillion, westonruter,
 apermo, SergeyBiryukov, TZ-Media, andizer, javorszky.
 See #22324, #25092, #43443, #43985, #64898.
 Fixes #44723.
 }}}

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


More information about the wp-trac mailing list