summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-12-19 10:52:37 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2003-12-19 10:52:37 +0000
commit81565fda5d68ebcede43b52f848a7f0f69adea39 (patch)
tree70853d3d09ac15759bf2fb600103da6375b99cf9 /includes/common.inc
parente06cdc577e45b7a0522f4f32ad25b598d19b510e (diff)
downloadbrdo-81565fda5d68ebcede43b52f848a7f0f69adea39.tar.gz
brdo-81565fda5d68ebcede43b52f848a7f0f69adea39.tar.bz2
- Fixing magic_gpc fix.
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');