PDA

View Full Version : Fatal error: Cannot redeclare stripslashesarray


Tim Wheatley
12-26-2001, 07:29 PM
<b>This error now solved, please scroll down three posts...</b>

Greatly appreciate some help. It's obviously some hack that's done it, but anyway,

When I try to run...

http://my---site/admin/user.php?action=modify

I get this error...

Fatal error: Cannot redeclare stripslashesarray() in /data/docs/my---site/docs/forum/admin/global.php on line 13

Here's lines 12-thru-28 of global.php...

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

----

Any ideas what could be wrong with this? I'm not very experienced as you can tell... :rolleyes:

amykhar
12-26-2001, 07:30 PM
global.php has been included more than once.

Amy

Tim Wheatley
12-26-2001, 07:37 PM
Thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you, thank you soooooo much! :D

Tim Wheatley
12-26-2001, 07:42 PM
Looks like I uncovered something else when you fixed that for me, this one is more serious?

Database error in vBulletin Control Panel 2.2.1:

Invalid SQL: SELECT *,FROM_UNIXTIME(joindate) AS joindate,FROM_UNIXTIME(lastvisit) AS lastvisit,FROM_UNIXTIME(lastactivity) AS lastactivity,FROM_UNIXTIME(lastpost) AS lastpost,FROM_UNIXTIME(awaydate) AS awaydate
avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
FROM user
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
WHERE user.userid=1268
mysql error: You have an error in your SQL syntax near 'avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar
' at line 2

mysql error number: 1064

Date: Wednesday 26th of December 2001 10:37:16 PM
Script: http://forum.racesimcentral.com/admin/user.php?s=&action=edit&userid=1268
Referer: http://forum.racesimcentral.com/admin/?s=

Admin
12-27-2001, 06:10 AM
In user.php add a comma (,) right after:
UNIXTIME(awaydate) AS awaydate

Tim Wheatley
12-27-2001, 05:51 PM
Terrific! Thank you very much Mr Chen! :)