[wp-trac] [WordPress Trac] #62562: Ensure get_current_screen() returns WP_Screen|null

WordPress Trac noreply at wordpress.org
Wed Jan 14 23:57:42 UTC 2026


#62562: Ensure get_current_screen() returns WP_Screen|null
------------------------------------+-----------------------------
 Reporter:  marian1                 |       Owner:  SergeyBiryukov
     Type:  enhancement             |      Status:  closed
 Priority:  normal                  |   Milestone:  7.0
Component:  Administration          |     Version:
 Severity:  trivial                 |  Resolution:  fixed
 Keywords:  has-patch dev-feedback  |     Focuses:
------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"61484" 61484]:
 {{{
 #!CommitTicketReference repository="" revision="61484"
 Administration: Ensure `get_current_screen()` returns `WP_Screen` or
 `null`.

 This adds a check that the `$current_screen` global is not only defined,
 but also has the correct type.

 Follow-up to [15746].

 Props marian1, mayanktripathi32, abcd95, im3dabasia1, SergeyBiryukov.
 Fixes #62562.
 }}}

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


More information about the wp-trac mailing list