Bug Warning: Invalid argument supplied for foreach() in [path]/dbtech/credits/credits_cor

Status
Not open for further replies.

joshuwae

Customer
Using the dropdowns to look @ specific currency:

/credits.php?u=&currencyid=2&actionid=

Warning: Invalid argument supplied for foreach() in [path]/dbtech/credits/credits_core.php on line 809
 
Can you please post the surrounding 10 lines in either direction? I am unable to find a foreach statement anywhere near that line in the Pro version of 2.1.0.
 
ten lines from

credits_core.php on line 809

I haven't edited any of the files.

The error message appears at the very top of the page.
 
Also - this has happened after upgrading vbcredits, vbshop, vbactivity, and applying patches to latest vB.
 
I'm getting this as well. I'm hoping you mean post the code from credits_core.php. I get it for line 843 which is in red.
Code:
function credits_events($actionid = '', $currencyid = 0, $array = false)
{
	global $vbulletin;
	$eventids = array();

	foreach ($vbulletin->vbcredits['event'] AS $aid => $currencies)
	{
		if (empty($actionid) OR $actionid == $aid)
		{
			foreach ($currencies AS $cid => $events)
			{
				if (empty($currencyid) OR $currencyid == $cid) $eventids = array_merge($eventids, array_keys($events));
			}
		}
	}
[COLOR="#FF0000"]	foreach ($vbulletin->vbcredits['history'] AS $aid => $currencies)[/COLOR]
	{
		if (empty($actionid) OR $actionid == $aid)
		{
			foreach ($currencies AS $cid => $events)
			{
				if (empty($currencyid) OR $currencyid == $cid) $eventids = array_merge($eventids, $events);
			}
		}
	}

	$eventids = array_unique($eventids);
	return ( $array ? $eventids : ( sizeof($eventids) ? 'eventid IN (' . implode(', ', $eventids) . ')' : '0' ) );
 
You can change that line to
PHP:
foreach ((array)$vbulletin->vbcredits['history'] AS $aid => $currencies)
:)
 
Status
Not open for further replies.

Similar threads

Legacy vBCredits II Deluxe

vBulletin 3.8.x vBulletin 4.x.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
845
Customer rating
0.00 star(s) 0 ratings
Top