Skip to main content

Undefined offsets Notice between finish and payment pages

6 years 6 months ago #317808 by webbits
-- 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.

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

6 years 6 months ago #317809 by webbits
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.

6 years 6 months ago #317826 by Jerome
Hello,

In the file with the error, please replace the line 206 from :
Code:
if(!isset($products_qty[ (int)$product_id ]) && $products_qty[ (int)$product_id ] !== 0)
To
Code:
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.

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

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