[wp-trac] [WordPress Trac] #58778: global _SERVER accessed in load.php without a global statement

WordPress Trac noreply at wordpress.org
Tue Jul 11 10:41:16 UTC 2023


#58778: global _SERVER accessed in load.php without a global statement
--------------------------+------------------------------
 Reporter:  xswarren      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  6.2.2
 Severity:  normal        |  Resolution:  invalid
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by knutsp):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Hello @xswarren, and welcome to Trac.

 Thank you for opening this ticket.

 This would be a bug for any other global variable, but the (array)
 variable `$_SERVER` in PHP belongs to a family of "superglobals"
 [https://www.php.net/manual/en/language.variables.superglobals.php] that
 is available and initialized in all scopes, without being declared
 `global`.

 So I close this as "invalid", our ugly term for things that cannot cause
 any action from the team.

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


More information about the wp-trac mailing list