Merge pull request #141 from max-kovpak/patch-2

POST_BIND deprecated
This commit is contained in:
Grégoire Passault 2015-09-25 09:21:54 +02:00
commit 476530a212
1 changed files with 2 additions and 2 deletions

View File

@ -70,8 +70,8 @@ class CaptchaType extends AbstractType
$options['bypass_code'],
$options['humanity']
);
$builder->addEventListener(FormEvents::POST_BIND, array($validator, 'validate'));
$event = \Symfony\Component\HttpKernel\Kernel::VERSION >= 2.3 ? FormEvents::POST_SUBMIT : FormEvents::POST_BIND;
$builder->addEventListener($event, array($validator, 'validate'));
}
/**