lexik/LexikMailerBundle

Check form is submited before validation

fmarchalemisys opened this issue · 0 comments

Symfony 4 fails with error "Cannot check if an unsubmitted form is valid. Call Form::isSubmitted() before Form::isValid()." in Form/Handler/EmailFormHandler.php at line 91.

The following code isn't valid any more:

    public function processForm(FormInterface $form, Request $request)
    {
        $valid = false;
        $form->handleRequest($request);
        if ($form->isValid()) {

The same code is found in LayoutFormHandler.php.