Created
March 6, 2014 06:58
-
-
Save fmtarif/9383857 to your computer and use it in GitHub Desktop.
#php - shortest recursive array processor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (get_magic_quotes_gpc()) { | |
function strip_array($var) { | |
return is_array($var)? array_map("strip_array", $var):stripslashes($var); | |
} | |
$_POST = strip_array($_POST); | |
$_SESSION = strip_array($_SESSION); | |
$_GET = strip_array($_GET); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment