To replicate: Go to checkout from the cart and select cancel right away.

The function uc_cart_checkout_form_cancel() tries to use the value of $_SESSION['cart_order'] to determine if an order number has been created yet. $_SESSION['cart_order'] will only have been set if uc_cart_checkout_form_validate() ran. Cancelling an order doesn't need / call uc_cart_checkout_form_validate() so unless the 'Review order' button was clicked before cancelling, the session value will not exist.

I left intval($_SESSION['cart_order']) > 0 don't think it's needed though?

CommentFileSizeAuthor
uc_cart.pages_.inc_.patch560 bytesdaniel bornman

Comments

tr’s picture

Status: Needs review » Fixed

Thanks. Confirmed PHP notice in 7.x-3.x and 6.x-2.x, confirmed the fix, and committed the patch to both branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

dgtlmoon’s picture