concretecms-community-store / community_store

An open, free and community developed eCommerce system for Concrete CMS
https://concretecms-community-store.github.io/community_store/
MIT License
106 stars 66 forks source link

Undefined array index in Cart::remove() #804

Closed mlocati closed 1 year ago

mlocati commented 1 year ago

I have this error in my logs:

Undefined array key 0

URL: https://mywebsite/cart/remove

File: [webroot]/packages/community_store/src/CommunityStore/Cart/Cart.php
Line: 603

Trace:
#0 [webroot]/packages/community_store/src/CommunityStore/Cart/Cart.php(603): Whoops\Run->handleError()
#1 [webroot]/packages/community_store/controllers/single_page/cart.php(226): Concrete\Package\CommunityStore\Src\CommunityStore\Cart\Cart::remove()
#2 [internal function]: Concrete\Package\CommunityStore\Controller\SinglePage\Cart->remove()

PS: I'm far away from my PC these days, I can't submit a pull request.

Mesuva commented 1 year ago

I reckon this may have been caused by a double click of a remove button. I've put a quick check in the function involved