note 71076 added to security.magicquotes
| From: | Thomas dot Hoggard at gmail dot com | Date: | Fri, 10 Nov 2006 21:09:21 +0000 |
| Subject: | note 71076 added to security.magicquotes | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119594@lists.php.net to get a copy of this message | ||
/****
* Recursivly removes all magicQuotes with multi-dimensional array support
****/
function removeMagicQuotes ($postArray, $trim = false)
{
if (get_magic_quotes_gpc() == 1)
{
$newArray = array();
foreach ($postArray as $key => $val)
{
if (is_array($val))
{
$newArray[$key] = removeMagicQuotes ($val, $trim);
}
else
{
if ($trim == true)
{
$val = trim($val);
}
$newArray[$key] = stripslashes($val);
}
}
return $newArray;
}
else
{
return $postArray;
}
}
----
Server IP: 66.163.161.117
Probable Submitter: 74.12.24.123
----
Manual Page -- http://www.php.net/manual/en/security.magicquotes.php
Edit -- https://master.php.net/note/edit/71076
Del: integrated -- https://master.php.net/note/delete/71076/integrated
Del: useless -- https://master.php.net/note/delete/71076/useless
Del: bad code -- https://master.php.net/note/delete/71076/bad+code
Del: spam -- https://master.php.net/note/delete/71076/spam
Del: non-english -- https://master.php.net/note/delete/71076/non-english
Del: in docs -- https://master.php.net/note/delete/71076/in+docs
Del: other reasons-- https://master.php.net/note/delete/71076
Reject -- https://master.php.net/note/reject/71076
Search -- https://master.php.net/manage/user-notes.php