diff --git a/includes/common.inc b/includes/common.inc index 9761314aa7e3215fcb4bbc3216460cc0367871fc..485ff2c178f6c5d1bfeb6bbb1f23a00e675ebbf2 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');