Fix for magic quotes

This commit is contained in:
Savetheinternet 2010-11-03 16:05:24 +11:00
parent 1f1417373f
commit 7181634dcb

View File

@ -12,6 +12,16 @@
$body = ''; $body = '';
// Fix for magic quotes
if (get_magic_quotes_gpc()) {
function strip_array(&$var) {
return is_array($var) ? array_map("strip_array", $var) : stripslashes($var);
}
strip_array($_SESSION);
strip_array($_GET);
strip_array($_POST);
}
if(isset($_POST['post'])) { if(isset($_POST['post'])) {
if( !isset($_POST['name']) || if( !isset($_POST['name']) ||
!isset($_POST['email']) || !isset($_POST['email']) ||