Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Form] Use !isset for checks cause this doesn't falsely include 0#41000
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
derrabus commentedApr 30, 2021
Can you add a test for this issue? Question: |
Nyholm commentedMay 7, 2021
Excellent PR. Thank you. If you add a small test for this I'll be happy to merge. |
KDederichs commentedMay 7, 2021
I'm kinda waiting on a reply in the mentioned issue tbh. |
KDederichs commentedMay 10, 2021
Sorry took me a while to get to it but I got some tests that would fail without the changes on both PRs |
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Form/Extension/Core/DataTransformer/DateTimeToArrayTransformer.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
xabbuh commentedMay 17, 2021
This applies to |
KDederichs commentedMay 17, 2021
Yeah it's actually a thing in all symfony versions I think. |
| '%s-%s-%s %s:%s:%s', | ||
| empty($value['year']) ?$this->referenceDate->format('Y') :$value['year'], | ||
| empty($value['month']) ?$this->referenceDate->format('m') :$value['month'], | ||
| empty($value['day']) ?$this->referenceDate->format('d') :$value['day'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
can you please ensure we have a test case using0 for year+month+day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Added it as test for DateType.
nicolas-grekas commentedMay 27, 2021
Thank you@KDederichs. |
By using isset 0 won't falsely included anymore