Behatch / contexts

Behat extension with most custom helper steps
Other
393 stars 203 forks source link

Fixed #236 - problem with automatic casting of numeric values #237

Closed kalehmann closed 6 years ago

kalehmann commented 6 years ago

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.

sanpii commented 6 years ago

Can you add a non-regression test like in #236 ?

kalehmann commented 6 years ago

Yes, I have done that.

OskarStark commented 6 years ago

@kalehmann can you associate your commits emailadress with your github emailadress?

kalehmann commented 6 years ago

Can I do this afterwards? I think I have to tell git my e-mail and then commit everything again to do so.

OskarStark commented 6 years ago

Its fine like this, @sanpii can squash your commits on merge

sanpii commented 6 years ago

@kalehmann you can squash all commits in one:

git reset --soft 32dcd9b
git commit
git push --force

This create a new commit and your new email will be used.

sanpii commented 6 years ago

Thank you 😃