[wp-trac] [WordPress Trac] #46671: wp-admin/revisions.php uses the $post global in the wrong way

WordPress Trac noreply at wordpress.org
Sun Jul 26 21:24:16 UTC 2020


#46671: wp-admin/revisions.php uses the $post global in the wrong way
--------------------------+-----------------------------
 Reporter:  tofandel      |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  5.5
Component:  Revisions     |     Version:  5.2
 Severity:  major         |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------
Changes (by SergeyBiryukov):

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


Comment:

 In [changeset:"48625" 48625]:
 {{{
 #!CommitTicketReference repository="" revision="48625"
 Revisions: Ensure the global `$post` remains the same after revision is
 restored.

 Because `wp_insert_post()` and `wp_transition_post_status()` are called
 during the process, plugins can unexpectedly modify `$post`.

 Props markparnell, tofandel, archon810, SergeyBiryukov.
 Fixes #46671.
 }}}

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


More information about the wp-trac mailing list