Warning: Creating default object from empty value in // validation d'un sérial

  • Posts: 8
  • Thank you received: 0
3 years 11 months ago #327255

-- HikaShop version -- : 4.4.4
-- HikaSerial version -- : 3.1.2
-- Joomla version -- : 3.9.23
-- PHP version -- : 7.4.13

Bonjour,

Lors de la validation d'un numéro de série via le menu "serial-cunsum" j'ai cette erreur qui apparait.
La fonction marche correctement et le serial et validé (utilisé).
Erreur:

Warning: Creating default object from empty value in /home/clients/xxxxxxx/web/administrator/components/com_hikaserial/classes/serial.php on line 323

Merci d'avance

Last edit: 3 years 11 months ago by Jerome. Reason: add [code] tag

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 11 months ago #327301

Bonjour,

Pouvez-vous copier/coller la ligne 323 du fichier concerné ?
De mon côté, cette ligne n'as pas de raison de poser soucis donc je pense qu'il y a un léger décallage.

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: 8
  • Thank you received: 0
3 years 11 months ago #327318

La voici


if(!empty($serial->managed))
return $serial->serial_id;

$serialConsumed = new stdClass();
$serialConsumed->serial_id = $serial->serial_id;
// 323 $serialConsumer->serial_consume_date = time();

Les sérials ont une date de validité de 12 mois.

Last edit: 3 years 11 months ago by pulsarprod.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
3 years 11 months ago #327342

Bonjour,

En effet, il y a une coquille que je n'ai pas vu en relisant le code, merci de remplacer la ligne par:

$serialConsumed->serial_consume_date = time();

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: 8
  • Thank you received: 0
3 years 11 months ago #327420

Super merci. La vilaine faute de frappe ;)

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

Moderators: Obsidev
Time to create page: 0.058 seconds
Powered by Kunena Forum