Skip to content

Comments

[laravel] Fix empty cart validation in ProductController#1289

Draft
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/product-controller-cart-validation
Draft

[laravel] Fix empty cart validation in ProductController#1289
sentry[bot] wants to merge 1 commit intomasterfrom
seer/fix/product-controller-cart-validation

Conversation

@sentry
Copy link
Contributor

@sentry sentry bot commented Feb 19, 2026

Fixes REACT-69C. The issue was that: Laravel's checkout function checks $quantities before its definition, causing an Undefined variable exception and a 500 error.

  • Moved the empty($quantities) check to occur after $quantities has been populated from $cart['quantities'].
  • Ensures that the "Invalid checkout request: cart is empty" exception is correctly thrown when cart['quantities'] is empty.
  • Prevents potential incorrect validation or errors if $quantities was checked before being fully processed.

This fix was generated by Seer in Sentry, triggered by yuval.nachon@sentry.io. 👁️ Run ID: 10304769

Not quite right? Click here to continue debugging with Seer.

@vercel
Copy link
Contributor

vercel bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
empower Ignored Ignored Preview Feb 19, 2026 3:46pm

Request Review

@sentry sentry bot requested a review from yuval-sentry February 19, 2026 15:46
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 22.07%. Comparing base (680bfca) to head (f0bb8a2).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1289      +/-   ##
==========================================
+ Coverage   22.01%   22.07%   +0.05%     
==========================================
  Files          42       42              
  Lines        1349     1350       +1     
  Branches      174      173       -1     
==========================================
+ Hits          297      298       +1     
  Misses       1026     1026              
  Partials       26       26              
Flag Coverage Δ
api 5.83% <ø> (ø)
frontend 32.60% <ø> (+0.08%) ⬆️
Components Coverage Δ
checkout_module 5.83% <ø> (ø)
product_component 26.13% <ø> (ø)
see 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants