|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #76880 Documentation shows case that cannot be used
Submitted: 2018-09-14 08:47 UTC Modified: 2018-09-14 11:45 UTC
From: kaisa dot lehikoinen at bromangroup dot fi Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: 7.2.10 OS:
Private report: No CVE-ID: None
 [2018-09-14 08:47 UTC] kaisa dot lehikoinen at bromangroup dot fi
From manual page:

The example error in documentation does not exist anymore (as of There is no possible way of catching the case when insufficient number of arguments is given with MessageFormatter

Test script:
$pattern="{gender, select, female { Hello Missis {name}! } male { Hello Mister {name}! } other {Hello {name}!}}";
$MessageFormatter= new \MessageFormatter($locale, $pattern);
$phrase= $MessageFormatter->format($params);
if(!$phrase) { //this part does not catch insufficient  number of arguments error
 echo 'error:'.$error;
return $phrase;

Expected result:
error: not enough parameters: U_ILLEGAL_ARGUMENT_ERROR (1)

Actual result:
Hello {name}!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-09-14 10:51 UTC]
-Status: Open +Status: Verified -Package: *Languages/Translation +Package: intl
 [2018-09-14 10:51 UTC]
Confirmed: <>.
 [2018-09-14 11:44 UTC]
Automatic comment from SVN on behalf of cmb
Log: Fix #76880: Documentation shows case that cannot be used

The example is invalid as of PHP 5.5.0, so we remove it.
Anybody with a working example?
 [2018-09-14 11:45 UTC]
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cmb
 [2018-09-14 11:45 UTC]
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.
 [2020-02-07 06:05 UTC]
Automatic comment on behalf of cmb
Log: Fix #76880: Documentation shows case that cannot be used
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Thu Oct 05 04:01:24 2023 UTC