1
0
mirror of https://github.com/dg/dibi.git synced 2025-08-12 00:54:11 +02:00

DibiResult::convert() correctly handles too big INT [Closes #18]

This commit is contained in:
David Grudl
2011-02-02 22:49:52 +01:00
parent 60b62c50fe
commit 4ea5ddae8e

View File

@@ -572,7 +572,7 @@ class DibiResult extends DibiObject implements IDataSource
return $this->getDriver()->unescape($value, $type);
case dibi::INTEGER:
return (int) $value;
return is_float($tmp = $value * 1) ? $value : $tmp;
case dibi::FLOAT:
return (float) $value;