diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 16:05:24 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2010-11-03 16:05:24 +1100 |
| commit | 7181634dcbeaba0375e91237f285f619e510bf65 (patch) | |
| tree | 7d421b1ae4c15d5f9ad142675427866af1788fdf | |
| parent | 1f1417373f7358b31f102072392c5c7a7a16f2e8 (diff) | |
Fix for magic quotes
| -rw-r--r-- | post.php | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -12,6 +12,16 @@ $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['name']) ||
!isset($_POST['email']) ||
|
