Skip to content

Commit

Permalink
Avoid error on submit empty coupon code fields
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Dec 20, 2023
1 parent 0aaeeef commit ae33fac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Extension/CartTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function removeEmptyCouponsOnPreSubmit(FormEvent $event): void
return;
}

$promotionCoupons = $formData['promotionCoupons'] ?? [];
$promotionCoupons = array_filter($formData['promotionCoupons'] ?? []);
if (!empty($promotionCoupons)) {
return;
}
Expand Down

0 comments on commit ae33fac

Please sign in to comment.