Skip to content

Commit

Permalink
Fixed issue #7302: Entering a number with a decimal causes the entry …
Browse files Browse the repository at this point in the history
…to be reset to zero
  • Loading branch information
c-schmitz committed Mar 7, 2013
1 parent 584c7b9 commit 5828456
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/sanitize_helper.php
Expand Up @@ -287,7 +287,7 @@ function sanitize_float($float, $min='', $max='')
{
$float = str_replace(',','.',$float);
// GMP library allows for high precision and high value numbers
if (function_exists('gmp_init'))
if (function_exists('gmp_init') && defined('GMP_VERSION') && version_compare(GMP_VERSION,'4.3.2')==1)
{
$gNumber = gmp_init($float);
if(($min != '' && gmp_cmp($gNumber,$min)<0) || ($max != '' && gmp_cmp($gNumber,$max)>0))
Expand Down

0 comments on commit 5828456

Please sign in to comment.