Fixes for float parsing when the number is less than 1

This commit is contained in:
David Bomba 2021-09-23 21:13:10 +10:00
parent 9330f51a86
commit 93e3a34181

View File

@ -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);