note 110865 deleted from function.get-magic-quotes-gpc by danbrown

From: Date: Thu, 17 Jan 2013 15:34:58 +0000
Subject: note 110865 deleted from function.get-magic-quotes-gpc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-193162@lists.php.net to get a copy of this message
Note Submitter: Lucifer ---- @Alix Axel's solution can't work at PHP5.2 because json_encode only receives 1 parameter. Here is my solution: <?php function ref_stripslashes(&$value,$key) { $value = stripslashes($value); } if((function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) || (ini_get('magic_quotes_sybase') && (strtolower(ini_get('magic_quotes_sybase'))!="off")) ) { array_walk_recursive($_GET,'ref_stripslashes'); array_walk_recursive($_POST,'ref_stripslashes'); array_walk_recursive($_COOKIE,'ref_stripslashes'); } ?>

« previous php.notes (#193162) next »