Skip to content

Commit

Permalink
bug #281 Fix of SymfonyForm error (oallain, GSadee)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.5 branch.

Discussion
----------

| Q               | A
| --------------- | -----
| Branch?         | 1.5
| Bug fix?        | yes
| New feature?    | no
| Related tickets | 


Fix of error :
```
request.CRITICAL: Uncaught PHP Exception Symfony\Component\Form\Exception\LogicException: "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." at /home/site/vendor/symfony/form/Form.php line 765 {"exception":"[object] (Symfony\\Component\\Form\\Exception\\LogicException(code: 0): Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid(). at /home/site/vendor/symfony/form/Form.php:765)"} []
```

Commits
-------

250c404 Fix of SymfonyForm error
a88d022 Merge branch '1.5' into oallain-patch-1
  • Loading branch information
GSadee authored Apr 15, 2024
2 parents e91c804 + a88d022 commit 438215e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/PayPalOrderItemController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function createFromProductDetailsAction(Request $request): Response

$form = $form->handleRequest($request);

if (!$form->isValid()) {
if ($form->isSubmitted() && !$form->isValid()) {
return new RedirectResponse((string) $request->headers->get('referer'));
}

Expand Down

0 comments on commit 438215e

Please sign in to comment.