note 110274 deleted from function.get-magic-quotes-gpc by danbrown
| From: | danbrown@php.net | Date: | Wed, 17 Oct 2012 21:26:16 +0000 |
| Subject: | note 110274 deleted from function.get-magic-quotes-gpc by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-191399@lists.php.net to get a copy of this message | ||
Note Submitter: f dot ju at fu-berlin dot de
----
Get rid of them, once and for all:
<?php
if (get_magic_quotes_gpc()) {
function i_fucking_hate_magic_quotes_so_much(&$arr) {
foreach ($arr as $key => &$val) {
if ($key == "GLOBALS") { continue; }
if (is_array($val)) {
i_fucking_hate_magic_quotes_so_much($val);
} else {
$val = stripslashes($val);
}
}
}
i_fucking_hate_magic_quotes_so_much($GLOBALS);
}
?>