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

WordPress Trac noreply at wordpress.org
Fri Apr 9 11:28:49 UTC 2021


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

 * milestone:  Awaiting Review => 5.8


Comment:

 Hi there, thanks for the ticket!

 As noted above, this is not an issue, as the variable is defined in the
 parent file before `edit-form-blocks.php` is included. That said, I think
 it makes sense to switch to `$post->ID` here avoid any future confusion.

 Note: This also applies to a similar fragment and a few other instances in
 `edit-form-advanced.php`.

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


More information about the wp-trac mailing list