From 250c404839aae6a534429c08b16ec560f9fd1753 Mon Sep 17 00:00:00 2001 From: oallain Date: Wed, 22 Nov 2023 18:22:04 +0100 Subject: [PATCH] Fix of SymfonyForm error --- src/Controller/PayPalOrderItemController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/PayPalOrderItemController.php b/src/Controller/PayPalOrderItemController.php index 545fa3c6..40fe83b4 100644 --- a/src/Controller/PayPalOrderItemController.php +++ b/src/Controller/PayPalOrderItemController.php @@ -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')); }