-3

Warning: implode() [function.implode]: Invalid arguments passed in [path]/clancp.php on line 1394

// ###################### Start Manage Clan Invites Page #######################

if ($_REQUEST['do'] == 'manageinvite')

{

if (count($clan['invite']) == 0)
{
    // No invites
    eval(standard_error(fetch_error('rpg_clan_no_invites_sent')));
}

$usernames_query = $db->query_read("
    SELECT `rpgname`, `userid`, `clanid`
    FROM `" . TABLE_PREFIX . "rpg_user`
    WHERE `userid` IN(" . implode(', ', $clan['invite']) . ")
");
while ($userinfo = $db->fetch_array($usernames_query))
{
    $checked = '';
    if ($userinfo['clanid'] > 0)
    {
        // In clan
        $checked = ' checked="checked"';
    }
    
    // Fetch template for each user
    eval('$invitedbit .= "' . fetch_template('rpg_clan_user_invitedbit') . '";');
}
$db->free_result($usernames_query);

Please help I'm new at this. I need to find the problem.

Line 1394 ###### WHERE userid IN(" . implode(', ', $clan['invite']) . ")
Community
  • 1
  • 1

1 Answers1

1

$clan['invite'] is not an array. var_dump it to see what it is.

FYI, count($clan['invite']) will evaluate to 1 if it's not an array.

mpen
  • 272,448
  • 266
  • 850
  • 1,236
  • I'm sorry i'm noob a this: what is var_dump? and how do I set it up? – Anime Tribes Dec 13 '12 at 04:15
  • bool(false) Warning: implode() [function.implode]: Invalid arguments passed in [path]/clancp.php on line – Anime Tribes Dec 13 '12 at 04:27
  • @AnimeTribes: `var_dump` is a function, as I'm sure you've discovered by now. It's telling you that your variable is `false` which confirms my suspicions that it's not an array. Where's that variable coming from? How do you initialize `$clan`? – mpen Dec 13 '12 at 04:56
  • Thank you all, I have found the solution. – Anime Tribes Dec 16 '12 at 02:11