Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Doctrine][Form] support large integers#20499
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
xabbuh commentedNov 12, 2016
| Q | A |
|---|---|
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #15642 |
| License | MIT |
| Doc PR | n/a |
fabpot commentedNov 22, 2016
Thank you@xabbuh. |
This PR was merged into the 2.7 branch.Discussion----------[Doctrine][Form] support large integers| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#15642| License | MIT| Doc PR | n/aCommits-------6954a07 [Doctrine][Form] support large integers
| // databases such as PostgreSQL fail. | ||
| $values =array_values(array_filter($values,function ($v) { | ||
| return (string)$v === (string) (int)$v; | ||
| return (string)$v === (string) (int)$v ||ctype_digit($v); |
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.
Why aren't you only usingctype_digit()? Does the first test anything, that the second test does not?
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.
Yes,ctype_digit() does not work with integers:https://3v4l.org/oi7fd
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.
Yes, you are right. Maybeis_int($v) || ctype_digit($v) orctype_digit((string) $v) would be more readable.
Not important, though.