summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc8
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 9761314aa..485ff2c17 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -144,14 +144,16 @@ function throttle($type, $rate) {
function _fix_gpc_magic(&$item, $key) {
if (is_array($item)) {
- array_walk($item, '_fix_gpc_magic_array');
+ array_walk($item, '_fix_gpc_magic');
+ }
+ else {
+ $item = stripslashes($i);
}
- $item = stripslashes($i);
}
function fix_gpc_magic() {
static $fixed = false;
- if ($fixed && ini_get("magic_quotes_gpc")) {
+ if (!$fixed && ini_get("magic_quotes_gpc")) {
array_walk($_GET, '_fix_gpc_magic');
array_walk($_POST, '_fix_gpc_magic');
array_walk($_COOKIE, '_fix_gpc_magic');