Warning: Invalid argument supplied for ...

  • Posts: 84
  • Thank you received: 2
12 years 9 months ago #38217

Issue we get when we click on a product displayed in Hikashop module:

Warning: Invalid argument supplied for foreach() in /home/valueart/public_html/cms2/administrator/components/com_hikashop/classes/field.php on line 118


Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 9 months ago #38218

Please replace the code:

							foreach($parents as $parent){
								$categories[$data->product_id]['parents'][$parent->category_id]=$parent->category_id;
							}

by:
if(!empty($parents) && is_array($parents)){
							foreach($parents as $parent){
								$categories[$data->product_id]['parents'][$parent->category_id]=$parent->category_id;
							}
						}

in that file and it should remove that warning.

The following user(s) said Thank You: sdhakad

Please Log in or Create an account to join the conversation.

  • Posts: 84
  • Thank you received: 2
12 years 9 months ago #38222

Thanks Done.

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum