Skip to content

Commit

Permalink
Merge pull request #2480 from dpfaffenbauer/issue/2302
Browse files Browse the repository at this point in the history
[FrontendBundle] check for isSubmitted before calling isValid
  • Loading branch information
dpfaffenbauer authored Dec 13, 2023
2 parents c5c2fbd + 812f439 commit fdda0f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit fdda0f4

Please sign in to comment.