Skip to content

Commit

Permalink
Merge pull request #2 from fliespl/patch-1
Browse files Browse the repository at this point in the history
check if value is already float to not fall into floating point conversion…
  • Loading branch information
dotfry authored Aug 16, 2020
2 parents de77745 + 947e97e commit ca78e27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/SixDreams/Bulk/BulkUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ protected function simpleValue($value, AbstractPlatform $platform, ?ColumnMetada
return 'NULL';
}
if (is_numeric($value)) {
if(\is_float($value)) {
return $value;
}

if (\strpos((string) $value, '.') !== false || \strpos((string) $value, ',') !== false) {
return (float) $value;
}
Expand Down

0 comments on commit ca78e27

Please sign in to comment.