From 812f439d066d5cb150432f64313abc2a859fe074 Mon Sep 17 00:00:00 2001 From: Dominik Pfaffenbauer Date: Tue, 12 Dec 2023 21:20:41 +0100 Subject: [PATCH] [FrontendBundle] check for isSubmitted before calling isValid --- .../Bundle/FrontendBundle/Controller/RegisterController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/RegisterController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/RegisterController.php index 5d111060f4..99eb4942e8 100644 --- a/src/CoreShop/Bundle/FrontendBundle/Controller/RegisterController.php +++ b/src/CoreShop/Bundle/FrontendBundle/Controller/RegisterController.php @@ -48,7 +48,7 @@ public function registerAction(Request $request): Response if (in_array($request->getMethod(), ['POST', 'PUT', 'PATCH'], true)) { $form = $form->handleRequest($request); - if ($form->isValid()) { + if ($form->isSubmitted() && $form->isValid()) { $customer = $form->getData(); $customer->setLocaleCode($this->get('coreshop.context.locale')->getLocaleCode());