Skip to content

Commit e6caa72

Browse files
committed
minor #5970 Remove isSubmitted call (DanielSiepmann)
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes #5970). Discussion ---------- Remove isSubmitted call Streamline with http://symfony.com/doc/current/book/forms.html#handling-form-submissions There is no need for `isSubmitted` as this is done inside `isValid` Commits ------- cebd5fd Remove isSubmitted call
2 parents b9c298e + cebd5fd commit e6caa72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/doctrine/registration_form.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ controller for displaying the registration form::
222222

223223
// 2) handle the submit (will only happen on POST)
224224
$form->handleRequest($request);
225-
if ($form->isValid() && $form->isSubmitted()) {
225+
if ($form->isSubmitted() && $form->isValid()) {
226226
// 3) Encode the password (you could also do this via Doctrine listener)
227227
$encoder = $this->get('security.encoder_factory')
228228
->getEncoder($user);

0 commit comments

Comments
 (0)