Skip to content

Commit

Permalink
add form isSubmitted() check
Browse files Browse the repository at this point in the history
to avoid `Cannot check if an unsubmitted form is valid.` exception issue FriendsOfSymfony#347
  • Loading branch information
szabogyula authored Feb 18, 2020
1 parent 9afcc54 commit 323921b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FormHandler/AbstractMessageFormHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function process(Form $form)

$form->handleRequest($request);

if ($form->isValid()) {
if ($form->isSubmitted() && $form->isValid()) {
return $this->processValidForm($form);
}

Expand Down

0 comments on commit 323921b

Please sign in to comment.