Warning vendorpoints plugin

  • Posts: 224
  • Thank you received: 26
  • Hikashop Business
9 months 5 days ago #353661

-- HikaShop version -- : 4.7.4
-- Joomla version -- : 4.3.3
-- PHP version -- : 8.1.21
-- Browser(s) name and version -- : Google chrome
-- Error-message(debug-mod must be tuned on) -- : Warning: Undefined property: stdClass::$old - plugins/hikashop/vendorpoints/vendorpoints.php on line 161

Warning: Undefined property: stdClass::$old - plugins/hikashop/vendorpoints/vendorpoints.php on line 161
Warning: Attempt to read property "order_type" on null in plugins/hikashop/vendorpoints/vendorpoints.php on line 161

In backend, go to orders and change the status of one order and that message it will be visible for 2-4 frames in the popup.

PS. Sorry, I didn't picked the right category for this message :silly:

Attachments:
Last edit: 9 months 5 days ago by oxido. Reason: To clarify that the message is not in the right category

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

  • Posts: 26013
  • Thank you received: 4004
  • MODERATOR
9 months 4 days ago #353679

Hello,

You can replace the line with :

if( (!empty($order->order_type) && $order->order_type != 'subsale') || (!empty($order->old) && $order->old->order_type != 'subsale') )
And it should avoid the warning.

Please note that you should not display PHP warning in a production environment.

Regards,


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.
The following user(s) said Thank You: oxido

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

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