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

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

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

Fixed with r14577