Warning vendorpoints plugin

  • Posts: 231
  • Thank you received: 28
  • Hikashop Business
1 year 5 months 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: 1 year 5 months 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: 26166
  • Thank you received: 4029
  • MODERATOR
1 year 5 months 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.055 seconds
Powered by Kunena Forum