PDO warning

  • Posts: 22
  • Thank you received: 1
5 hours 24 minutes ago #369664

-- HikaShop version -- : 6.1.1
-- Joomla version -- : 5.4.1
-- PHP version -- : 8.3
-- Error-message(debug-mod must be tuned on) -- : ( ! ) Deprecated: PDO::quote(): Passing null to parameter #1 ($string) of type string is deprecated in \libraries\vendor\joomla\database\src\Mysql\MysqlDriver.php on line 711

Once I create an order in frontend, I see this error:

( ! ) Deprecated: PDO::quote(): Passing null to parameter #1 ($string) of type string is deprecated in \libraries\vendor\joomla\database\src\Mysql\MysqlDriver.php on line 711

The problem is that hikashopOrder_productClass->save() is called,
Next, it quotes all data and around line 122 the data can be NULL. NULL can't be passed to $db->quote()

$this->database->Quote(@$product->order_product_shipping_params),

This code is better, if you don't save NULLs but empty strings:
$this->database->Quote($product->order_product_shipping_params ?? ''),

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

  • Posts: 84804
  • Thank you received: 13806
  • MODERATOR
1 hour 13 minutes ago #369665

Hi,

Thank you for your feedback. I've made a patch for it on our end for the next version of HikaShop.

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

Time to create page: 0.045 seconds
Powered by Kunena Forum