[wp-trac] [WordPress Trac] #53235: Ensure consistent type for integer properties of WP_Post, WP_Term, and WP_User

WordPress Trac noreply at wordpress.org
Wed May 19 22:11:14 UTC 2021


#53235: Ensure consistent type for integer properties of WP_Post, WP_Term, and
WP_User
----------------------------+-----------------------------
 Reporter:  SergeyBiryukov  |       Owner:  SergeyBiryukov
     Type:  defect (bug)    |      Status:  closed
 Priority:  normal          |   Milestone:  5.8
Component:  General         |     Version:
 Severity:  normal          |  Resolution:  fixed
 Keywords:  has-patch       |     Focuses:
----------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * status:  accepted => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50935" 50935]:
 {{{
 #!CommitTicketReference repository="" revision="50935"
 General: Ensure consistent type for integer properties of `WP_Post`,
 `WP_Term`, and `WP_User`.

 Previously, these properties could be unexpectedly converted to strings in
 some contexts.

 This applies to the following functions:

 * `sanitize_post_field()`
 * `sanitize_term_field()`
 * `sanitize_user_field()`

 and the following properties:

 * `WP_Post::ID`
 * `WP_Post::post_parent`
 * `WP_Post::menu_order`
 * `WP_Term::term_id`
 * `WP_Term::term_taxonomy_id`
 * `WP_Term::parent`
 * `WP_Term::count`
 * `WP_Term::term_group`
 * `WP_User::ID`

 Props grantmkin, SergeyBiryukov.
 Fixes #53235. See #52995.
 }}}

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


More information about the wp-trac mailing list