Jump to content


Photo

vBulletin Problem - implode()


  • Please log in to reply
1 reply to this topic

#1 AncientSage

AncientSage
  • Members
  • PipPipPip
  • Advanced Member
  • 56 posts

Posted 25 September 2006 - 10:26 PM

Warning: implode() [function.implode]: Bad arguments. in /admincp/index.php on line 128

There is my error. The line is as follows:

$vbulletin->GPC['navprefs'] = implode(',', $vbulletin->GPC['navprefs']);

The implode function should be working, given that it is an official vBulletin release. However, there seems to be something wrong with it (PHP version IS above required by vBulletin).

$groups = explode(',', $vbulletin->GPC['groups']);

		foreach ($groups AS $group)
		{
			if (empty($group))
			{
				continue;
			}

			$vbulletin->input->clean_gpc('r', "num$group", TYPE_UINT);

			for ($i = 0; $i < $vbulletin->GPC["num$group"]; $i++)
			{
				$vbulletin->GPC['navprefs'][] = $group . "_$i";
			}
		}

		$vbulletin->GPC['navprefs'] = implode(',', $vbulletin->GPC['navprefs']);

Help appreciated.

#2 Jocka

Jocka
  • Members
  • PipPipPip
  • Advanced Member
  • 344 posts
  • LocationDallas, Texas

Posted 26 September 2006 - 06:19 PM

could be something simple.. try changing that line to these 2 lines (the way I'd do it)

$navprefs = $vbulletin->GPC['navprefs'];
$vbulletin->GPC['navprefs'] = implode(',', $navprefs);

I'm thinking the problem is where the two single quotes are around 'navprefs' in the class, it's assuming thats where to start or something.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users