We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 3.1.4
Double in database is returned as string.
Double with a lot of zeros is returned as string (f.e. 0.000074601974431321)
(float)0.000074601974431321 -> 7.4601974431321e-5 $row[$key] = (string) $float === $value ? $float : $value; // FALSE, return string -> Helpers->normalizeRow() row 210
$row[$key] = (string) $float === $value ? $float : $value;
Return float
$row[$key] = preg_match("/^-{0,1}\d+\.\d+$/", $value) === 1 ? $float : $value;
The text was updated successfully, but these errors were encountered:
normalizeRow() don't return small float as string [Closes #289]
416df9c
b128240
ea9e634
b138afb
No branches or pull requests
Version: 3.1.4
Bug Description
Double in database is returned as string.
Steps To Reproduce
Double with a lot of zeros is returned as string (f.e. 0.000074601974431321)
(float)0.000074601974431321 -> 7.4601974431321e-5
$row[$key] = (string) $float === $value ? $float : $value;
// FALSE, return string -> Helpers->normalizeRow() row 210Expected Behavior
Return float
Possible Solution
$row[$key] = preg_match("/^-{0,1}\d+\.\d+$/", $value) === 1 ? $float : $value;
The text was updated successfully, but these errors were encountered: