Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

normalize group for null value #18

Closed
aitboudad opened this issue Jul 31, 2015 · 3 comments
Closed

normalize group for null value #18

aitboudad opened this issue Jul 31, 2015 · 3 comments

Comments

@aitboudad
Copy link

Form with submit btn doesn't work properly:

Warning: array_filter() expects parameter 1 to be array, null given in [FormRuleContext.php#L29](https://github.com/boekkooi/JqueryValidationBundle/blob/726f34e7c4cef101bf5b6b998346b342b45c42ed/src/Form/FormRuleContext.php#L29)
$builder->add('submit', 'submit');

I think the default value for group should be array and not null normalizeGroups

@boekkooi
Copy link
Owner

boekkooi commented Aug 2, 2015

Hi @aitboudad

I'm unable to reproduce this error would it be possible to provide me with a example form + model? Also what symfony version are you using?

Thanks for reporting!

@aitboudad
Copy link
Author

@boekkooi here is an example to reproduce the issue:

    public function issues18Action(Request $request)
    {
        $form = $this->get('form.factory')->createNamedBuilder('')
            ->add('submit', 'submit')
            ->getForm();
        $this->handleForm($request, $form);

        return $this->render('::form.html.twig', array('form' => $form->createView()));
    }

boekkooi added a commit that referenced this issue Aug 2, 2015
@boekkooi
Copy link
Owner

boekkooi commented Aug 2, 2015

Thanks for the very quick response this should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants