[wp-trac] [WordPress Trac] #18322: The Road to Magic Quotes Sanity
WordPress Trac
wp-trac at lists.automattic.com
Sun Oct 2 04:26:28 UTC 2011
#18322: The Road to Magic Quotes Sanity
--------------------------+-----------------------------
Reporter: ryan | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: 3.2.1
Severity: normal | Resolution:
Keywords: |
--------------------------+-----------------------------
Comment (by dd32):
> attachment WP_Request.php added
The ArrayObject work above replacing $_GET inspired my thought, so I've
whipped this class up.
It doesn't deal with the functions expecting slashed or otherwise, but
reinvents the wheel by giving a wrapper for the superglobals - but in
doing so, adds functionality which most plugins require (is the variable
set? Else we've got a default for that), along with extracting only a
selection of the fields (ie. `?key=1&key2=2&key3=3` we could use
`GET::get( array('key', 'key3', 'key99'), array('key99' => 'Agent 99') );`
to only get those 3 fields, droping back to the $defaults for unset data)
Quick fun half hour project to see what was possible with PHP5 magic.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18322#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list