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

WordPress Trac noreply at wordpress.org
Sun Sep 13 00:29:55 UTC 2015


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

Comment (by dd32):

 Even if static analysis tools complain, I feel that the function should at
 a minimum not create a copy of `$_REQUEST` just to avoid their warnings,
 it feels and looks worse than using the super globals directly for what
 they're designed for.

 I'd have probably suggested going with a simple `get admin request action`
 method instead, and used `if ( 'adduser' == get admin request action )`.

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


More information about the wp-trac mailing list