Bug #53775 [NEW]: parseCurrency returns 0 instead of false

From: Date: Tue, 18 Jan 2011 08:56:58 +0000
Subject: Bug #53775 [NEW]: parseCurrency returns 0 instead of false
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-157974@lists.php.net to get a copy of this message
From: Operating system: win xp PHP version: 5.3SVN-2011-01-18 (SVN) Package: Unknown/Other Function Bug Type: Bug Bug description:parseCurrency returns 0 instead of false Description: ------------ Hi! :) I think i have found a bug in NumberFormatter. parseCurrency() returns 0 instead of false in the following test script. Same Problem with parse(). Test script: --------------- $fmt=new NumberFormatter('de_DE',NumberFormatter::CURRENCY); $result=$fmt->parseCurrency('aaa',$currency); //$result=$fmt->parse('aaa'); // results: var_dump($result); // float(0) var_dump($currency); // string(0) "" // no errors!! var_dump($fmt->getErrorCode()); // int(0) var_dump($fmt->getErrorMessage()); // string(12) "U_ZERO_ERROR" var_dump(intl_is_failure($fmt->getErrorCode())); // bool(false) -- Edit bug report at http://bugs.php.net/bug.php?id=53775&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53775&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53775&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53775&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53775&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53775&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53775&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53775&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53775&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53775&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53775&r=support Expected behavior: http://bugs.php.net/fix.php?id=53775&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53775&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53775&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53775&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53775&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53775&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53775&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53775&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53775&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53775&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53775&r=mysqlcfg

« previous php.bugs (#157974) next »