Quote:
Originally Posted by dancue
This is my error:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /index.php(537) : eval()'d code on line 119
I've found the plug-in causing the error. I opened it saw an array and did as instructed above, but still received the same error.
Can anyone help me with this please?
Here is the code within the plug-in:
Code:
if($vbulletin->options['siteteam_active'] == 1) {
$userid = $vbulletin->userinfo['userid'];
$languageid = $vbulletin->userinfo['languageid'];
$user = $vbulletin->db->query_first_slave("
SELECT language.phrasegroup_siteteam AS phrasegroup_siteteam
FROM ".TABLE_PREFIX."user AS user
LEFT JOIN ".TABLE_PREFIX."language AS language
ON (language.languageid = " . (!empty($languageid) ? $languageid : "IF(user.languageid = 0, " . intval($vbulletin->options['languageid']) . ", user.languageid)") . ")
WHERE user.userid = $userid
");
$tmp = unserialize($user["phrasegroup_siteteam"]);
$vbphrase = array_merge($vbphrase, $tmp);
require_once('includes/functions_user.php');
require_once('includes/functions_bigthree.php');
$limit = $vbulletin->options['siteteam_count'];
$teamarray = $vbulletin->db->query_read("
SELECT *
FROM ".TABLE_PREFIX."user
JOIN ".TABLE_PREFIX."usergroup AS ugroup
ON ugroup.usergroupid=".TABLE_PREFIX."user.usergroupid
LEFT JOIN ".TABLE_PREFIX."usergroup
ON (FIND_IN_SET(".TABLE_PREFIX."usergroup.usergroupid, ".TABLE_PREFIX."user.membergroupids))
WHERE ugroup.siteteam=1 OR ".TABLE_PREFIX."usergroup.siteteam=1
GROUP BY ".TABLE_PREFIX."user.userid
ORDER BY RAND()
LIMIT $limit
");
while ($team = $vbulletin->db->fetch_array($teamarray)){
if($vbulletin->options['siteteam_type']== 1) {
$avatarurl = fetch_avatar_url($team['userid']);
if (!$avatarurl) {
$teamavatar = 'images/misc/noavatar.gif';
} else {
$teamavatar = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
} else {
$teamavatar = '';
$teamuserinfo = verify_id('user', $team['userid'], 1, 1, 47);
$showprofilepic = ($vbulletin->options['profilepicenabled'] AND
$teamuserinfo['profilepic'] AND
($permissions['genericpermissions'] &
$vbulletin->bf_ugp_genericpermissions['canseeprofilepic'] OR
$vbulletin->userinfo['userid'] == $teamuserinfo['userid'])) ? true : false;
if($vbulletin->options['usefileavatar']) {
$teamavatar = $vbulletin->options['profilepicurl'] . '/profilepic' . $teamuserinfo['userid'] . '_' . $teamuserinfo['profilepicrevision'] . '.gif';
} else {
$teamavatar = 'image.php?' . $vbulletin->session->vars['sessionurl'] . 'u=' . $teamuserinfo['userid'] . "&dateline=$teamuserinfo[profilepicdateline]&type=profile";
}
if(empty($teamavatar) || !$showprofilepic) {
$avatarurl = fetch_avatar_url($team['userid']);
if(!$avatarurl) {
$teamavatar = 'images/misc/noavatar.gif';
} else {
$teamavatar = $vbulletin->options['bburl'] . '/' . $avatarurl[0];
}
}
}
$userinfo = verify_id('user', $team['userid'], 1, 1);
$userinfo['lastactivitydate'] = vbdate($vbulletin->options['dateformat'], $userinfo['lastactivity'], true);
$userinfo['lastactivitytime'] = vbdate($vbulletin->options['timeformat'], $userinfo['lastactivity']);
$useronline = fetch_online_status($userinfo, true);
$userinfo['onlinestatuskey'] = $userinfo['onlinestatus'];
$totalcount ++;
eval('$teambits .= "' . fetch_template('siteteam_teambits') . '";');
}
unset($teamarray);
eval('$meetteams .= "' . fetch_template('siteteam_main') . '";');
$footer = '<br />'.$meetteams.$footer;
}
|
Try changing this:
$tmp = unserialize($user["phrasegroup_siteteam"]);
to this:
$tmp[] = unserialize($user["phrasegroup_siteteam"]);
You have to feed it an array in order for you not to get an error.