ZF-6176: Zend_Locale_Format: isFloat() fails since Rev. 14170
Description
After an upgrade from zf 1.7.5 to 1.7.6
the following test fails:
ZF v1.7.5
var_dump(Zend_Locale_Format::isFloat('')) => false // ok var_dump(Zend_Locale_Format::isFloat(null)) => false // ok
ZF v1.7.6
var_dump(Zend_Locale_Format::isFloat('')) => true // should be false var_dump(Zend_Locale_Format::isFloat(null)) => true // should be false var_dump(Zend_Locale_Format::isFloat(' ')) => false // ok
isFloat() returns true for empty strings or null values, which is a changed behavior compared to the previous version and should be fixed asap. Same for isInteger().
Comments
Posted by Sonntag (sunday) on 2009-04-01T04:58:29.000+0000
Localized to de_DE, the following also fails:
var_dump(Zend_Locale_Format::isFloat(',')); -> fails with the Exception "No value in , found"
var_dump(Zend_Locale_Format::isFloat('')) -> fails with "No value in found"... in what? The message says nothing at all.
var_dump(Zend_Locale_Format::isFloat('.')); returns false which seems ok
Posted by Thomas Weidner (thomas) on 2009-04-01T05:04:01.000+0000
Note that the second is a independently issue. (empty is not a sign within a special locale).
Please do no throw multiple issues within one issue. This is irritating and does not help solving them.
Thanks
Posted by Thomas Weidner (thomas) on 2009-04-01T06:40:59.000+0000
Fixed with r14577