ZF-6176: Zend_Locale_Format: isFloat() fails since Rev. 14170

Issue Type: Bug Created: 2009-04-01T04:47:56.000+0000 Last Updated: 2009-04-01T06:41:00.000+0000 Status: Resolved Fix version(s): - 1.8.1 (12/May/09)

Reporter: Sonntag (sunday) Assignee: Thomas Weidner (thomas) Tags: - Zend_Locale

Related issues: Attachments:


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().


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.


Posted by Thomas Weidner (thomas) on 2009-04-01T06:40:59.000+0000

Fixed with r14577

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.