Zend Framework

Zend_Locale_Format: isFloat() fails since Rev. 14170

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major 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().

Activity

Hide
Sonntag added a comment -

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

Show
Sonntag added a comment - 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
Hide
Thomas Weidner added a comment -

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

Show
Thomas Weidner added a comment - 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
Hide
Thomas Weidner added a comment -

Fixed with r14577

Show
Thomas Weidner added a comment - Fixed with r14577

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: