[wp-trac] [WordPress Trac] #22325: Abstract GPCS away from the superglobals

WordPress Trac noreply at wordpress.org
Wed Feb 27 17:05:00 UTC 2013


#22325: Abstract GPCS away from the superglobals
-------------------------+-----------------------------
 Reporter:  rmccue       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  General      |     Version:
 Severity:  minor        |  Resolution:
 Keywords:               |
-------------------------+-----------------------------

Comment (by aaroncampbell):

 Replying to [comment:35 CaptainN]:
 > PHP already has a $_REQUEST array, which is actually $_GET, $_POST, and
 $_COOKIE combined. Why build a different request array, instead of just
 using the (well understood) one PHP already has?

 The PHP created one isn't guaranteed to contain $_GET and $_POST, or to
 load them in any predictable order because it's controlled with settings
 in the PHP config file (older:
 [http://www.php.net/manual/en/ini.core.php#ini.variables-order variables-
 order], newer: [http://www.php.net/manual/en/ini.core.php#ini.request-
 order request-order]).  Also, if you read that paragraph on request-order
 it says that it doesn't include $_COOKIE in $_REQUEST due to security
 concerns.  Most pre-5.3 PHP setups still do that, but WordPress fixes the
 issue by overriding $_REQUEST with a safe and predictable version.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/22325#comment:36>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list