Fixes for float parsing when the number is less than 1
This commit is contained in:
parent
9330f51a86
commit
93e3a34181
1 changed files with 3 additions and 0 deletions
|
|
@ -61,6 +61,9 @@ class Number
|
|||
// convert "," to "."
|
||||
$s = str_replace(',', '.', $value);
|
||||
|
||||
if($value < 1)
|
||||
return (float)$s;
|
||||
|
||||
// remove everything except numbers and dot "."
|
||||
$s = preg_replace("/[^0-9\.]/", '', $s);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue