mirror of
https://github.com/dg/dibi.git
synced 2025-08-13 17:44:11 +02:00
Result: improved normalization of int
This commit is contained in:
@@ -492,7 +492,9 @@ class DibiResult extends DibiObject implements IDataSource
|
|||||||
if ($value === FALSE || $type === dibi::TEXT) {
|
if ($value === FALSE || $type === dibi::TEXT) {
|
||||||
|
|
||||||
} elseif ($type === dibi::INTEGER) {
|
} elseif ($type === dibi::INTEGER) {
|
||||||
$row[$key] = is_float($tmp = $value * 1) ? $value : $tmp;
|
$row[$key] = is_float($tmp = $value * 1)
|
||||||
|
? (is_string($value) ? $value : (int) $value)
|
||||||
|
: $tmp;
|
||||||
|
|
||||||
} elseif ($type === dibi::FLOAT) {
|
} elseif ($type === dibi::FLOAT) {
|
||||||
$value = ltrim($value, '0');
|
$value = ltrim($value, '0');
|
||||||
|
Reference in New Issue
Block a user