From 4ea5ddae8e5d62302097ecc3073103597246ea70 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 2 Feb 2011 22:49:52 +0100 Subject: [PATCH] DibiResult::convert() correctly handles too big INT [Closes #18] --- dibi/libs/DibiResult.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dibi/libs/DibiResult.php b/dibi/libs/DibiResult.php index cd2810fa..94ac009d 100644 --- a/dibi/libs/DibiResult.php +++ b/dibi/libs/DibiResult.php @@ -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;