cubecart / v6

CubeCart Version 6
https://cubecart.com
73 stars 57 forks source link

Missing Order Number to View Order #3638

Closed bhsmither closed 2 months ago

bhsmither commented 2 months ago

When a non-logged-in customer uses the link found in the Order Confirmation email, when first presented with the Order Lookup form, the Order Number is taken from the web address given to the customer in their email, "/index.php?_a=vieworder&cart_order_id=xxxx".

If a non-logged-in customer just happens to want to visit "/index.php?_a=vieworder" _without providing the cart_orderid part, that will generate an 'Undefined array key' error in /classes/cubecart.class.php, line 2789.

Suggest:

$cart_order_id = Order::validOrderId(trim($_GET['cart_order_id'] ?? '')) ? trim($_GET['cart_order_id'] ?? '') : '';

abrookbanks commented 2 months ago

Thank you.