Skip to content
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 case in GETPOST function #7149

Closed
wants to merge 1 commit into from

Conversation

dolibarr95
Copy link
Contributor

@dolibarr95 dolibarr95 commented Jul 13, 2017

Fix #7148 Add a case to check 'float'

Add a case to check 'float' with is_float() to fix Dolibarr#7148
@eldy
Copy link
Member

eldy commented Jul 13, 2017

For the moment the 'int' should be enough (name is not correct), but parameter 'int' means
a value that is a numeric (it can be a float), so you should use 'int'

@eldy eldy added the PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) label Jul 13, 2017
@dolibarr95
Copy link
Contributor Author

Hi
Ok, so i should correct the htdocs/admin/multicurrency.php file.
tks

dolibarr95 added a commit to dolibarr95/dolibarr that referenced this pull request Jul 13, 2017
@eldy
Copy link
Member

eldy commented Jul 13, 2017

No
The data coming from rate is a string that can contains very special char (some language has special separator). If you don't want to loose data from user, you must keep alpha into the GETPOST.

But later, you must make $ratenum = price2num($rate)
and use $ratenum as the numeric value for database insert or for calculation.

@eldy eldy closed this in #7152 Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants