Deprecated error for filters

  • Posts: 1092
  • Thank you received: 12
  • Hikashop Business
2 days 6 hours ago #367343

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.1

Hi!

I created a checkbox custom field and filter, assigned some products to have results but i get this error:

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/php8/public_html/milonopoulos-carpets.gr/administrator/components/com_hikashop/classes/filter.php on line 1821


and it only shows 1 of 3 field data of the custom field.

What is that error? I reinstalled latest Hikashop update but didn't help.

Thank you!

Attachments:

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

  • Posts: 83894
  • Thank you received: 13580
  • MODERATOR
1 day 17 hours ago #367360

Hi,

Note that this is not an error. It's a deprecated message to warn developers that something won't be supported in the next major version of PHP. So, this helps us make changes to HikaShop for the future.
On a live website, you're not supposed to display deprecated messages. I would recommend turning that off in the php.ini of your hosting.
I've added a patch for this message on our end. Download again the install package of HikaShop on our website and install it on yours and you won't get it anymore.
Note also that this message is not supposed to happen normally.
It basically means that you didn't select anything in the custom field of the filter for one or several products on the listing (or at least you didn't save one or several products since adding the field) while you have the "dynamic display" setting of the filter activated. In that case, the system looks at the values selected in each product in the custom field to filter out the other non used values from the filter.
The fact that it only shows 1 choice confirms what I'm saying. If you always want the filter to display all the choices, then you want to turn off the "dynamic display" setting of the filter, as it is by default. And it will in fact remove the deprecated message without even adding the patch.

The following user(s) said Thank You: verzevoul

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

Time to create page: 0.054 seconds
Powered by Kunena Forum