note 66082 added to function.stripslashes
| From: | Kibby at osu1 dot php dot net | Date: | Sun, 14 May 2006 09:49:02 +0000 |
| Subject: | note 66082 added to function.stripslashes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111256@lists.php.net to get a copy of this message | ||
For hauser's note, here's a solution:
<?
if ( get_magic_quotes_gpc() ) {
function stripslashes_deep($value) {
$value = is_array($value) ? array_map('stripslashes_deep', $value) : (isset($value) ?
stripslashes($value) : null);
return $value;
}
$_POST = stripslashes_deep($_POST);
$_GET = stripslashes_deep($_GET);
$_COOKIE = stripslashes_deep($_COOKIE);
}
?>
----
Server IP: 66.207.199.35
Probable Submitter: 70.71.6.97
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.stripslashes.php
Edit -- http://master.php.net/note/edit/66082
Del: integrated -- http://master.php.net/note/delete/66082/integrated
Del: useless -- http://master.php.net/note/delete/66082/useless
Del: bad code -- http://master.php.net/note/delete/66082/bad+code
Del: spam -- http://master.php.net/note/delete/66082/spam
Del: non-english -- http://master.php.net/note/delete/66082/non-english
Del: in docs -- http://master.php.net/note/delete/66082/in+docs
Del: other reasons-- http://master.php.net/note/delete/66082
Reject -- http://master.php.net/note/reject/66082
Search -- http://master.php.net/manage/user-notes.php