This repository was archived by the owner on Apr 20, 2021. It is now read-only.
Fixed #236 - problem with automatic casting of numeric values#237
Closed
kalehmann wants to merge 1 commit intoBehatch:masterfrom
Closed
Fixed #236 - problem with automatic casting of numeric values#237kalehmann wants to merge 1 commit intoBehatch:masterfrom
kalehmann wants to merge 1 commit intoBehatch:masterfrom
Conversation
Member
|
Can you add a non-regression test like in #236 ? |
kalehmann
pushed a commit
to kalehmann/contexts
that referenced
this pull request
Jan 25, 2018
As suggested in Behatch#237 a new test for headers with numeric values larger than PHP_INT_MAX has been added.
Contributor
Author
|
Yes, I have done that. |
OskarStark
approved these changes
Jan 25, 2018
Contributor
|
@kalehmann can you associate your commits emailadress with your github emailadress? |
Contributor
Author
|
Can I do this afterwards? I think I have to tell git my e-mail and then commit everything again to do so. |
kalehmann
pushed a commit
to kalehmann/contexts
that referenced
this pull request
Jan 25, 2018
As suggested in Behatch#237 a new test for headers with numeric values larger than PHP_INT_MAX has been added.
Contributor
|
Its fine like this, @sanpii can squash your commits on merge |
Member
|
@kalehmann you can squash all commits in one: This create a new commit and your new email will be used. |
The automatic casting of numeric values in the BaseContext class is limited by the PHP_INT_MAX constant. Any string with an numeric value larger than PHP_INT_MAX gets automatically casted to an integer with the value of PHP_INT_MAX. This could lead to problems, for example when sending a http-header with a large numeric value. This workaround checks if the numeric value is equal or larger than PHP_INT_MAX and does not cast to integer in this case. Also added a test for this case.
Member
|
Thank you 😃 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The automatic casting of numeric values in the BaseContext class
is limited by the PHP_INT_MAX constant. Any string with an numeric
value larger than PHP_INT_MAX gets automatically casted to an
integer with the value of PHP_INT_MAX.
This could lead to problems, for example when sending a http-header
with a large numeric value.
This workaround checks if the numeric value is equal or larger than
PHP_INT_MAX and does not cast to integer in this case.