[wp-trac] [WordPress Trac] #33837: We should avoid Superglobals when possible

WordPress Trac noreply at wordpress.org
Fri Sep 11 21:17:20 UTC 2015


#33837: We should avoid Superglobals when possible
----------------------------+--------------------
 Reporter:  wonderboymusic  |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  4.4
Component:  General         |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+--------------------

Comment (by wonderboymusic):

 Replying to [comment:3 ocean90]:
 > Also what's the benefit of this change since we're still accessing/using
 the superglobal?

 Every PHP analysis tool complains about superglobal access - basically
 means that access is supposed to be wrapped up in a framework. Doesn't
 mean they're Never accessed, just rarely. So, being present in the
 function counts as 1, and removes 27, which is better.

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


More information about the wp-trac mailing list