mollie / Sylius

Mollie payment gateway integration for Sylius
MIT License
4 stars 17 forks source link

Fix some cases where `$order->getPayments()->last()` can return false #10

Closed markbeazley closed 9 months ago

markbeazley commented 1 year ago

There are some cases where $order->getPayments()->last() can return false, and there are checks for if the returned value is null, but in some instances (notably src/Menu/AdminOrderShowMenuListener.php) where its possible for an order to have no payments (for example use of a gift voucher or 100% off discount code) and this would lead to 500 server errors.