[Skip to main content](#vessel-content)

#   Warning: Invalid argument supplied for ...

##

- **[sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")**
- [![sdhakad's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5771-sdhakad "View sdhakad's Profile") Topic Author
- [ Offline](/forum/user/5771-sdhakad)

Less More

- Posts: 84
- Thank you received: 2
-
-

14 years 9 months ago [\#38217](#38217) by [sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")  *[Warning: Invalid argument supplied for ...](/forum/3-bug-report/38217-warning-invalid-argument-supplied-for#38217 "Issue we get when we click on a product displayed in Hikashop module:  Warning: Invalid argument supplied for foreach() in /home/valueart/public&#95;html/cms2/administrator/components/com&#95;hikashop/classes/field.php on line 118")* was created by *[sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")*

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

[ ![116.png](/forum/attachment/2621) ](/forum/attachment/2621 "116.png")

- [ ![116.png](/forum/attachment/2621) ](/forum/attachment/2621 "116.png") [ ](/forum/attachment/2621?download=1 "116.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODIxNy13YXJuaW5nLWludmFsaWQtYXJndW1lbnQtc3VwcGxpZWQtZm9yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

14 years 9 months ago [\#38218](#38218) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Warning: Invalid argument supplied for ...](/forum/3-bug-report/38217-warning-invalid-argument-supplied-for#38218 "Issue we get when we click on a product displayed in Hikashop module:  Warning: Invalid argument supplied for foreach() in /home/valueart/public&#95;html/cms2/administrator/components/com&#95;hikashop/classes/field.php on line 118")*

Please replace the code: Code:

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

by: Code:

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

in that file and it should remove that warning.

The following user(s) said Thank You: [sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODIxNy13YXJuaW5nLWludmFsaWQtYXJndW1lbnQtc3VwcGxpZWQtZm9yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")**
- [![sdhakad's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/5771-sdhakad "View sdhakad's Profile") Topic Author
- [ Offline](/forum/user/5771-sdhakad)

Less More

- Posts: 84
- Thank you received: 2
-
-

14 years 9 months ago [\#38222](#38222) by [sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")  Replied by *[sdhakad](/forum/user/5771-sdhakad "View sdhakad's Profile")* on topic *[Re: Warning: Invalid argument supplied for ...](/forum/3-bug-report/38217-warning-invalid-argument-supplied-for#38222 "Issue we get when we click on a product displayed in Hikashop module:  Warning: Invalid argument supplied for foreach() in /home/valueart/public&#95;html/cms2/administrator/components/com&#95;hikashop/classes/field.php on line 118")*

Thanks Done.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODIxNy13YXJuaW5nLWludmFsaWQtYXJndW1lbnQtc3VwcGxpZWQtZm9yP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.059 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
