Deprecated: trim(): Passing null to parameter #1 ($string) of type string error

  • Posts: 517
  • Thank you received: 8
  • Hikashop Business
2 years 3 months ago #344145

-- HikaShop version -- : 4.6.1
-- Joomla version -- : 4.2
-- PHP version -- : 8
-- Browser(s) name and version -- : chrome
-- Error-message(debug-mod must be tuned on) -- : Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/vhosts/xxxxx.co.uk/administrator/components/com_hikashop/classes/field.php on line 2309

Hi, Im updating to J4 and get the attached error message in checkout?
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in xxxxxx.co.uk/administrator/components/com_hikashop/classes/field.php on line 2309

Last edit: 2 years 2 months ago by mohairbears.

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

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

Hi,

Thank you for your feedback.
You can add the code :

if(is_null($value))
			$value = '';
just before the line of the error in administrator/components/com_hikashop/classes/field.php and it will remove the deprecated message.
We'll add the change on our end too for the next version of HikaShop.

The following user(s) said Thank You: mohairbears

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

Time to create page: 0.055 seconds
Powered by Kunena Forum