Commit 1862f645 authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge branch 'DBAL-121'

parents dd7beb2f 9f51afa2
......@@ -40,6 +40,6 @@ class DecimalType extends Type
public function convertToPHPValue($value, AbstractPlatform $platform)
{
return (null === $value) ? null : (double) $value;
return (null === $value) ? null : $value;
}
}
\ No newline at end of file
......@@ -60,7 +60,7 @@ class TypeConversionTest extends \Doctrine\Tests\DbalFunctionalTestCase
array('array', array('foo' => 'bar'), 'array'),
array('object', $obj, 'object'),
array('float', 1.5, 'float'),
array('decimal', 1.55, 'float'),
array('decimal', 1.55, 'string'),
);
}
......
......@@ -21,7 +21,7 @@ class DecimalTest extends \Doctrine\Tests\DbalTestCase
public function testDecimalConvertsToPHPValue()
{
$this->assertInternalType('float', $this->_type->convertToPHPValue('5.5', $this->_platform));
$this->assertInternalType('string', $this->_type->convertToPHPValue('5.5', $this->_platform));
}
public function testDecimalNullConvertsToPHPValue()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment