note 71076 deleted from security.magicquotes by philip

From: Date: Sun, 21 Dec 2008 01:08:00 +0000
Subject: note 71076 deleted from security.magicquotes by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148395@lists.php.net to get a copy of this message
Note Submitter: Thomas dot Hoggard at gmail dot com ---- /**** * 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; } }

« previous php.notes (#148395) next »