error in php 202

  • Posts: 12
  • Thank you received: 0
10 months 1 week ago #352497

-- HikaShop version -- : 4.73
-- Joomla version -- : 4
-- PHP version -- : 8
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : good afternoon guys i have this error
Deprecated
: Creation of dynamic property plgSystemHikashopgeolocation::$geolocation is deprecated in
C:\xamp\htdocs\lefala\plugins\system\hikashopgeolocation\hikashopgeolocation.php
on line
202

good afternoon guys i have this error
Deprecated
: Creation of dynamic property plgSystemHikashopgeolocation::$geolocation is deprecated in
C:\xamp\htdocs\lefala\plugins\system\hikashopgeolocation\hikashopgeolocation.php
on line
202

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

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
10 months 1 week ago #352504

Hi,

Thanks for your feedback. You must be on PHP 8.2
Please note that this is not an error. This is a message from PHP to developers to let them know that in the next version of PHP, something will change which will generate an error if the code is not changed.
Normally, that message should not appear on a production website. So I would recommend turning off the "error reporting" setting of the Joomla configuration, or properly configuring the php.ini of the server to not output deprecation messages.

Of course, we're going to change the code to not have the deprecation message so that HikaShop won't get an error there on PHP9. The change is quite simple, it consists on adding the line:
public $geolocation;
before the line:
function __construct(&$subject, $config){
in the file plugins\system\hikashopgeolocation\hikashopgeolocation.php

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

Time to create page: 0.055 seconds
Powered by Kunena Forum