8000 Date constraint throws an ErrorException · Issue #2609 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Date constraint throws an ErrorException #2609

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

Closed
ondrowan opened this issue Nov 11, 2011 · 0 comments
Closed

Date constraint throws an ErrorException #2609

ondrowan opened this issue Nov 11, 2011 · 0 comments

Comments

@ondrowan
Copy link
Contributor

Date / Birthday constraint works properly only if I write incorrect number to any of the fields. When I edit some of the values to string I keep getting error 500 (ErrorException) because checkdate expects parameters to be integers. Although this happens only if someone manually overrides values in select, I still think it should be consistent with other validators and simply return error message saying the format is wrong.

fabpot added a commit that referenced this issue Nov 11, 2011
Commits
-------

2582fcb Added tests for string fix in DateTimeToArrayTransformer (8351a11).
8351a11 Added check for array fields to be integers in reverseTransform method. This prevents checkdate from getting strings as arguments and throwing incorrect ErrorException when submitting form with malformed (string) data in, for example, Date field. #2609

Discussion
----------

Fix for #2609

Second take for fix for #2609, hope it's ok now. Tests are failing without my fix and passing with it.
@fabpot fabpot closed this as completed Nov 11, 2011
fabpot added a commit that referenced this issue Nov 11, 2011
* 2.0:
  [Form] fixed previous merge
  [Form] simplified previous merge
  Also identify FirePHP by the X-FirePHP-Version header
  [TwigBundle] Extract output buffer cleaning to method
  [TwigBundle] Do not clean output buffering below initial level
  Fixed rendering of FileType (value is not a valid attribute for input[type=file])
  Added tests for string fix in DateTimeToArrayTransformer (8351a11).
  Added check for array fields to be integers in reverseTransform method. This prevents checkdate from getting strings as arguments and throwing incorrect ErrorException when submitting form with malformed (string) data in, for example, Date field. #2609
  [Translation] removed unneeded methods
  [Translation] added detection for circular references when adding a fallback catalogue
  [DomCrawler] trim URI in getURI
  [Yaml][Tests] Fixed missing locale string for Windows platforms which caused test to fail
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
0