Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.6, 1.7.7, 1.7.8
-
Fix Version/s: 1.8.1
-
Component/s: Zend_Locale
-
Labels:None
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().
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