Depreciated warnings after upgrading to php 8.2

  • Posts: 176
  • Thank you received: 5
  • Hikashop Business
9 months 3 weeks ago #354545

-- HikaShop version -- : 4.7.5
-- Joomla version -- : 4.3.3
-- PHP version -- : 8.2

We have errors disabled in Joomla configuration. However, after upgrading to Joomla 4 and PHP 8.2 we are getting many depreciated warnings on our Hikashop pages. How do we disable these messages?

E.g.
Deprecated: Creation of dynamic property plgHikashopShopclosehours::$ranges is deprecated in /public_html/plugins/hikashop/shopclosehours/shopclosehours.php on line 181

Deprecated: Creation of dynamic property checkoutController::$workflow is deprecated in /public_html/components/com_hikashop/controllers/checkout.php on line 57

Deprecated: Creation of dynamic property plgHikashopMarket::$discountClass is deprecated in /public_html/plugins/hikashop/market/market.php on line 829

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

  • Posts: 81851
  • Thank you received: 13138
  • MODERATOR
9 months 3 weeks ago #354550

Hi,

Make sure that the "debug" setting of the joomla configuration is also turned off.
If both are turned off and you still see the deprecated messages, it means that your server setup is forcing the display of the error messages and in that case, you'll need to check with your hosting.
Note also that next version of HikaShop will come with patches for these so most of them should not happen anymore.

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

  • Posts: 30
  • Thank you received: 1
9 months 1 week ago #354965

Hi,
unfortunately this incompatibility (also with PHP 8.1.23) is preventing one of my customers from uploading product images due to this error: "PHP Deprecated: Implicit conversion from float 232.71653543307087 to int loses precision in components/com_hikashop/helpers/image .php online 1518, referer: index.php?option=com_hikashop&ctrl=product"

Please, would you quickly address this aspect with a new version?
Thank you!
Kind regards

Attachments:
Last edit: 9 months 1 week ago by altrasoluzione.

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

  • Posts: 81851
  • Thank you received: 13138
  • MODERATOR
9 months 1 week ago #354967

Hi,

My answer was only for the other deprecated messages that were provided by @dustinjc before, which were specific to PHP 8.2

This new deprecated message is for something else and has nothing to do with the deprecated messages from @dustinjc besides the fact that they are deprecated messages.

I've studied the issue today for a few hours but I don't see how it's possible to get that message for the line 1518 of the adminsitrator/components/com_hikashop/helpers/image.php file (which is what is referenced by your deprecated message) of HikaShop 4.7.5
I checked your account and I can see your subscription expired 2 years ago. So I'm suspecting you're using an old version of HikaShop, and that your line 1518 is not the same as the one I'm looking at.
In fact, a similar deprecated message was reported 10 months ago here:
www.hikashop.com/forum/hikaauction/905366-error-php/346670.html
So there are several things I can say to you, knowing all that:
- if you are using an old version of HikaShop from 2 years ago, no wonder you get many deprecated messages on PHP 8.1. You can search for 8.1 on our changelog ( www.hikashop.com/support/documentation/5...ashop-changelog.html ) and you can see that we fixed many deprecated messages for PHP 8.1 in the past 2 years. Chances are that just updating HikaShop to the latest version would fix your problem.
- Since you're likely not using HikaShop 4.7.5, I can't be sure where the problem is since the line numbers don't match. Please provide your HikaShop version. With this, I can potentially look into it and check whether this problem is still in the latest version of HikaShop or it is actually fixed by a patch we made before. If it's still an issue in the latest version of HikaShop, then I will make a patch for it for the next version of HikaShop, and I can provide it to you.
- As I said to @dustinjc, if both the "error reporting" and "debug" settings of the Joomla configuration are turned off, you should not see these deprecated messages. So please check that.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum