note 99832 added to security.magicquotes.whynot
| From: | AlbinMrtensson at osu1 dot php dot net | Date: | Thu, 09 Sep 2010 13:46:42 +0000 |
| Subject: | note 99832 added to security.magicquotes.whynot | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172402@lists.php.net to get a copy of this message | ||
This is what I use to handle magic quotes
<?php
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);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 81.236.17.224
----
Manual Page -- http://www.php.net/manual/en/security.magicquotes.whynot.php
Edit -- https://master.php.net/note/edit/99832
Del: integrated -- https://master.php.net/note/delete/99832/integrated
Del: useless -- https://master.php.net/note/delete/99832/useless
Del: bad code -- https://master.php.net/note/delete/99832/bad+code
Del: spam -- https://master.php.net/note/delete/99832/spam
Del: non-english -- https://master.php.net/note/delete/99832/non-english
Del: in docs -- https://master.php.net/note/delete/99832/in+docs
Del: other reasons-- https://master.php.net/note/delete/99832
Reject -- https://master.php.net/note/reject/99832
Search -- https://master.php.net/manage/user-notes.php