php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #77871 NumberFormatter::formatCurrency returns false, which is not documented
Submitted: 2019-04-09 13:17 UTC Modified: 2019-04-17 10:47 UTC
From: yugenkr at gmail dot com Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: 7.2.17 OS: CentOS 7 and Darwin 18.5.0
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yugenkr at gmail dot com
New email:
PHP Version: OS:

 

 [2019-04-09 13:17 UTC] yugenkr at gmail dot com
Description:
------------
---
From manual page: https://php.net/numberformatter.formatcurrency
---

It's documented, that return value is a string. Appears, false may be returned.


--- intl ---
Internationalization support => enabled
version => 1.1.0
ICU version => 63.1
ICU Data version => 63.1
ICU TZData version => 2018e
ICU Unicode version => 11.0

php 7.2.16

Test script:
---------------
$formatter = new \NumberFormatter('es_DO', \NumberFormatter::CURRENCY);
$formatter->formatCurrency(10, 'RD$');
        
Expected result:
----------------
RD$10.00

Actual result:
--------------
false



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-04-11 15:51 UTC] cmb@php.net
-Status: Open +Status: Verified
 [2019-04-11 15:51 UTC] cmb@php.net
Indeed, INTL_METHOD_CHECK_STATUS[1] can return FALSE.

[1] <https://github.com/php/php-src/blob/php-7.3.4/ext/intl/formatter/formatter_format.c#L164>
 [2019-04-17 10:47 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=347262
Log: Fix #77871: NumberFormatter::formatCurrency returns false, which is not documented
 [2019-04-17 10:47 UTC] cmb@php.net
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2019-04-17 10:47 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2019-04-17 10:50 UTC] salathe@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=c792a834f8fb146ffd666d7b7e3571a2e96b5cb0
Log: Fix #77871: NumberFormatter::formatCurrency returns false, which is not documented
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=97d01b1bacfaf8696aa30cb9ec257f276f04950f
Log: Fix #77871: NumberFormatter::formatCurrency returns false, which is not documented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 09:01:29 2024 UTC