I keep getting this error when i change user names:
Warning: Argument to array_reverse() should be an array in /***/***/***/***/***/***/***/member.php on line 459
And this is whats on that line:
PHP Code:
$DB_site->query("UPDATE user SET username='".addslashes(htmlspecialchars($username))."' WHERE userid='$bbuserinfo[userid]'");
if ($oldnames=$DB_site->fetch_array($DB_site->query("SELECT * FROM namelogs WHERE userid='$bbuserinfo[userid]'"))) {
$oldnames = array_reverse($oldnames);
$oldnames = explode("<~>", $oldnames[usernames]);
if (count($oldnames) >= 5) {
$oldestuser = array_shift($oldnames);
array_splice($oldnames,4,4, addslashes($bbuserinfo[username]));
}
else {
array_push($oldnames,addslashes($bbuserinfo[username]));
}
$oldusers = implode($oldnames, "<~>");
$oldusers = array_reverse($oldusers); <<**>> LINE 459 <<**>>
$DB_site->query("UPDATE namelogs SET usernames='".addslashes($oldusers)."',lastchange='".time()."' WHERE userid='$bbuserinfo[userid]'");
}
else {
$DB_site->query("INSERT INTO namelogs (userid, usernames,lastchange) VALUES ('$bbuserinfo[userid]','".addslashes(htmlspecialchars($bbuserinfo[username]))."', '".time()."')");
}
$bbuserinfo[username] = $username;
}
}
Any Ideas? =/
-Syphin