Skip to content

Commit df530ce

Browse files
committed
fix convert string to float
1 parent 931dd2b commit df530ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Helper/General.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class General
77
{
88
public static function convertStringToFloat($value = ''): float
99
{
10+
$value = str_replace('.', '', $value);
1011
$value = str_replace(',', '.', $value);
1112
return (float)preg_replace("/[^-0-9\.]/", "", $value);
1213
}

0 commit comments

Comments
 (0)