Jump to content

Warning: Invalid argument supplied for foreach


bay_kolio

Recommended Posts

Hello friends,
I have problem. Need help from you.
In my error_log I have a series of errors:

[04-Feb-2011 20:58:41] PHP Warning:  Invalid argument supplied for foreach() in /classes/Category.php on line 320
[05-Feb-2011 18:30:47] PHP Warning:  Invalid argument supplied for foreach() in /modules/blockinfos/blockinfos.php on line 105
[05-Feb-2011 18:30:47] PHP Warning:  Invalid argument supplied for foreach() in /modules/blockcms/blockcms.php on line 156
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /product.php on line 217
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Pack.php on line 74
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Pack.php on line 102
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Category.php on line 480
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Pack.php on line 39
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /product.php on line 217
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Pack.php on line 74
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Pack.php on line 102
[05-Feb-2011 22:01:33] PHP Warning:  Invalid argument supplied for foreach() in /classes/Category.php on line 480
[05-Feb-2011 22:01:33] PHP Warning:  array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /classes/Product.php on line 1445
[05-Feb-2011 22:01:33] PHP Warning:  array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /classes/Product.php on line 1445



This leads to the following:
When add product to card that nothing happened. 0 price. After our all works normal than again.


these lines in files are:
Category.php on line 320 -

    foreach ($result AS &$row)     

{

/blockinfos.php on line 105 - -

foreach($cms AS $row)



/blockcms.php on line 156 - -

foreach($_cms as $cms)



/product.php on line 217 -

foreach ($images AS $k => $image)



/Category.php on line 480 -

foreach ($result AS $row)



/Pack.php on line 39 -

foreach ($result AS $row)




/Pack.php on line 74 -

 foreach ($result as $row)



/Pack.php on line 102 -

foreach ($result as $row)



/Product.php on line 1445 -

$attribute_price = Tools::convertPrice((array_key_exists('attribute_price', $result) ? floatval($result['attribute_price']) : 0), $currency);



Please give me idea where is mistake?

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...