Undefined offsets Notice between finish and payment pages

  • Posts: 15
  • Thank you received: 0
4 years 7 months ago #317808

-- url of the page with the problem -- : soulmatebrewing.com
-- HikaShop version -- : 4.2.3
-- HikaSerial version -- : 3.1.0
-- Joomla version -- : 3.9.16
-- PHP version -- : 7.3.16
-- Browser(s) name and version -- : FireFox 72.0.2
-- Error-message(debug-mod must be tuned on) -- : Notice: Undefined offset: 4 in home/customer/www/xxx/public_html/administrator/components/com_hikaserial/classes/product.php on line 206

Notice: Undefined offset: 5 in home/customer/www/xxx/public_html/administrator/components/com_hikaserial/classes/product.php on line 206

Notice: Undefined offset: 7 in home/customer/www/xxx/public_html/administrator/components/com_hikaserial/classes/product.php on line 206

Orders processed as expected. And Serials are working. However when buyer clicks finish a white page with Undefined defined offset notice appears for 2 seconds before going to payment page; using Hikashop Square 1.0.0. The payment processes as expected.

Undefined offset: 4, 5 and 7 -

components/com_hikaserial/classes/product.php on line 206

The notice is viewed by the public. Is there a way hide the notice or resolve the cause of the notice?

Thank you.

Attachments:

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

  • Posts: 15
  • Thank you received: 0
4 years 7 months ago #317809

Correction: the notice appears after submitting credit card information and the thank you page.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
4 years 7 months ago #317826

Hello,

In the file with the error, please replace the line 206 from :

if(!isset($products_qty[ (int)$product_id ]) && $products_qty[ (int)$product_id ] !== 0)
To
if(!isset($products_qty[ (int)$product_id ]) || $products_qty[ (int)$product_id ] !== 0)
It will remove the notice.

Please note that displaying PHP errors (notices, warning) in a production website is considered as security issues since your users/customer can see elements that they shouldn't.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.066 seconds
Powered by Kunena Forum