Affects Version/s: 2.1.2
Fix Version/s: None
Security Level: All
"decimal: Type that maps an SQL DECIMAL to a PHP double."
However, in the commit history, we can see that the casting to a float is removed: https://github.com/doctrine/dbal/commits/master/lib/Doctrine/DBAL/Types/DecimalType.php. Casting to a double is not possible in PHP?This seems to result in a float as well, that is probably why it was removed.
I found this out when using PHP's 'is_double()' function (alias of is_float()) to check whether a decimal property was set or not.
Suggestion is to either:
- cast to a double (which seems not possible)
- cast to a float (why was this removed?)
- do nothing to the code, update documentation that string is returned.
In my check function I guess I will use the is_numeric() function.