mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 05:37:39 +02:00
DibiResult: fixed detection of "123.000" as float [Closes #67]
This commit is contained in:
@@ -514,7 +514,7 @@ class DibiResult extends DibiObject implements IDataSource
|
||||
$row[$key] = is_float($tmp = $value * 1) ? $value : $tmp;
|
||||
|
||||
} elseif ($type === dibi::FLOAT) {
|
||||
$row[$key] = (string) ($tmp = (float) $value) === $value ? $tmp : $value;
|
||||
$row[$key] = (string) ($tmp = (float) $value) === rtrim(rtrim($value, '0'), '.') ? $tmp : $value;
|
||||
|
||||
} elseif ($type === dibi::BOOL) {
|
||||
$row[$key] = ((bool) $value) && $value !== 'f' && $value !== 'F';
|
||||
|
Reference in New Issue
Block a user