[wp-trac] [WordPress Trac] #22325: Abstract GPCS away from the superglobals
WordPress Trac
noreply at wordpress.org
Fri Nov 2 20:21:11 UTC 2012
#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 CaptainN):
Replying to [comment:17 MikeSchinkel]:
> Replying to [comment:16 CaptainN]:
> > Here's a quick version I through together (without testing):
> > $wp_get = $_GET;
> > $wp_post = $_POST;
> > $wp_request = $_REQUEST;
> > $wp_cookie = $_COOKIE;
> > $wp_server = $_SERVER;
>
> Ignoring everything else for the moment, I think WordPress is moving
away from global vars and not adding any new ones. Can someone else
confirm this?
>
Right, ideally that'd all be wrapped in a class and store that data in
properties instead of just dumping them into the global space.
Also note, your implementation would need to do something similar. Right
now you wrap the superglobals directly, which carries with it whatever
baggage WordPress is dumping into those (as well as any damage done to
them by plugin authors etc. - I once manually unslashed the GPCS values,
before I understood why they were being magic quoted even though the
php.ini setting was off - I've seen others do that, and I actually wonder
how many plugins still do it).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22325#comment:19>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list