Error PHP

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 2 months ago #344215

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.1.5
-- PHP version -- : 8.1.9

Hi.
I am preparing on a parallel domain to upgrade to joomla 4.
The php version installed on this domain is 8.1.9.
On the product category pages I get the following error messages:
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/filter.php on line 702

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/customer/www/domain.es/public_html/administrator/components/com_hikashop/classes/filter.php on line 702
What I can do?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344216

Hi,

That's not really error messages.
These are messages for developers to notify them of code that will need to be updated to continue working in future versions of PHP.
Normally users should not see them.
If you turn off the error reporting / debug settings of the Joomla configuration, you won't see them.
To remove them, you can try changing the code:

if(!isset($infoGet) || count($infoGet) == 0 || (empty($infoGet[0]) && !strlen($infoGet[0])))
to:
if(!isset($infoGet) || count($infoGet) == 0 || !isset($infoGet[0]) || (empty($infoGet[0]) && !strlen($infoGet[0])))
in the file /administrator/components/com_hikashop/classes/filter.php
Let us know how it goes so that we can include the change on our end.

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

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 2 months ago #344241

Hi Nicolas.
I have changed that line of code and the message no longer appears.
I don't understand why that message appeared in php version 8.1.9 and didn't appear in older versions like 7.4.30 or version 8.1.9.
The version that does not work and gives an error in joomla is 8.2.0, which throws this error message:

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /home/customer/www/singastosdeenvio.es/public_html/libraries/vendor/voku/portable-utf8/src/voku/helper/UTF8.php on line 4653

Deprecated: Function utf8_decode() is deprecated in /home/customer/www/singastosdeenvio.es/public_html/libraries/vendor/joomla/uri/src/UriHelper.php on line 36

Deprecated: Function utf8_decode() is deprecated in /home/customer/www/singastosdeenvio.es/public_html/libraries/vendor/joomla/uri/src/UriHelper.php on line 36

¿En qué versión de PHP estáis trabajando vosotros en vuestro joomla?
Un saludo.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
2 years 2 months ago #344242

Hi,

As I said, these are not errors. Just messages for developers.
So normally, you should not see them.
You only see them because either your PHP is not configured properly or you activated the error reporting/debug in the Joomla configuration.
support.cpanel.net/hc/en-us/articles/360...Deprecated-warnings-
Joomla will also change its code so that in the future, these messages don't turn into real errors.

I personally use PHP 8.1.

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

  • Posts: 311
  • Thank you received: 8
  • Hikashop Business
2 years 2 months ago #344246

Thanks Nicolás.
A pleasure working with you.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum