-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Float in GET params #200
Comments
dg
added a commit
that referenced
this issue
May 29, 2018
dg
added a commit
that referenced
this issue
May 29, 2018
note: gettype() returns 'double', ReflectionType returns 'float'
dg
added a commit
that referenced
this issue
May 29, 2018
note: gettype() returns 'double', ReflectionType returns 'float'
dg
added a commit
that referenced
this issue
Sep 12, 2018
note: gettype() returns 'double', ReflectionType returns 'float'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: 2.4.12
Bug Description
There is a problem when converting float GET params in
\Nette\Application\UI\ComponentReflection::convertType()
. Because conversion from string to float and back does not have to give the same result, in some cases it ends up with the data-loss check.Steps To Reproduce
When you call
/foo/bar/?length=1.2
everything work as expected.When you call
/foo/bar/?length=1.0
the BadRequestException is thrown.Expected Behavior
Value 1.0 should be treated as float not string.
Possible Solution
I was not able to find out other solution then handle each scalar type differently.
The text was updated successfully, but these errors were encountered: