Notice fatigante quand messages d'erreurs activés

  • Posts: 263
  • Thank you received: 11
11 years 2 months ago #121710

À chaque fois que j'active le débogage système de Joomla!, j'obtiens un paquet de :

Notice: Trying to get property of non-object in .../administrator/components/com_hikashop/classes/currency.php on line 795
Ma ligne 795 du fichier currency.php est :
foreach($childs[$discount->discount_category_id] as $cat){
						$catIds[] = (int)$cat->category_id;
					}
Je sais qu'on m'avait fait ajouté le (int) il y a quelques semaines pour un certain bogue.

Y a-t-il moyen d'améliorer le code afin que la notice disparaisse définitivement?

Merci à tous

Merci à vous

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

  • Posts: 26159
  • Thank you received: 4028
  • MODERATOR
11 years 2 months ago #121711

Bonjour,

Merci d'indiquer la version d'HikaShop que vous utilisez.

Cordialement,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 263
  • Thank you received: 11
11 years 2 months ago #121712

Veuillez m'excuser.

J'utilise Hikashop 2.2.0 Business.

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
11 years 2 months ago #121718

Changez la ligne:

$catIds[] = (int)$cat->category_id;

en:
if(is_object($cat)) $catIds[] = (int)$cat->category_id;

The following user(s) said Thank You: Flooder

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

Time to create page: 0.061 seconds
Powered by Kunena Forum