PDA

View Full Version : Fatal error: Cannot redeclare stripslashesarray() in


L-Mane
09-29-2002, 09:25 PM
Fatal error: Cannot redeclare stripslashesarray() in D:\web_public\site\forum\global.php on line 31

Here got the area where the error is at

// get rid of slashes in get / post / cookie data
function stripslashesarray (&$arr) {
while (list($key,$val)=each($arr)) {
if ($key!="templatesused" and $key!="argc" and $key!="argv") {
if (is_string($val) AND (strtoupper($key)!=$key OR ("".intval($key)=="$key"))) {
$arr["$key"] = stripslashes($val);
} else if (is_array($val) AND ($key == 'HTTP_POST_VARS' OR $key == 'HTTP_GET_VARS' OR strtoupper($key)!=$key)) {
$arr["$key"] = stripslashesarray($val);
}
}
}

How can I fix this here problem?

g-force2k2
09-30-2002, 12:59 AM
im not sure... but you can try changing this line

$arr["$key"] = stripslashesarray($val);

to this

$arr["$key"] = stripslashes($val);

because on the first instance you're defining that function... and in the function you're trying to call a function that you're defining... hope that makes some sense... regards...

g-force2k2

L-Mane
10-02-2002, 08:36 PM
Now I get this error

Fatal error: Cannot redeclare stripslashesarray() in D:\site\site\site\global.php on line 31
Query: UPDATE session SET lastactivity=1033594518,location='/site/member.php' WHERE sessionhash='4312483c78e4ee44ff4012ebf1b1a507' Time before: 0.00029599666595459 Time after: 0.071889042854309
--------------------------------------------------------------------------------
Query: UPDATE user SET lastactivity=1033594518,inforum='0' WHERE userid='1' Time before: 0.072347044944763 Time after: 0.66364800930023

Scott MacVicar
10-04-2002, 03:20 PM
you've included global.php twice by the sounds of it