[wp-trac] [WordPress Trac] #52995: Undefined `$post_ID` variable in `edit-form-blocks.php`

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


#52995: Undefined `$post_ID` variable in `edit-form-blocks.php`
--------------------------+-----------------------------
 Reporter:  ravipatel     |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.8
Component:  Editor        |     Version:  5.0
 Severity:  normal        |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:
--------------------------+-----------------------------

Comment (by SergeyBiryukov):

 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/52995#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list