#48751 [Asn->Csd]: intl Locale::filterMatches wrong parameters and example
| From: | stas@php.net | Date: | Wed, 01 Jul 2009 20:32:01 +0000 |
| Subject: | #48751 [Asn->Csd]: intl Locale::filterMatches wrong parameters and example | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-2443@lists.php.net to get a copy of this message | ||
ID: 48751
Updated by: stas@php.net
Reported By: ladislav at marek dot su
-Status: Assigned
+Status: Closed
Bug Type: Documentation problem
Operating System: irrelevant
PHP Version: Irrelevant
Assigned To: stas
New Comment:
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.
fixed, thanks
Previous Comments:
------------------------------------------------------------------------
[2009-07-01 11:26:40] bjori@php.net
By the looks of things, the 3rd argument (canonical) should be boolean
(default to false)..
Stas: Could you update the locale_api.php and proto, and the
arginfo+param parsing if I'm right?
------------------------------------------------------------------------
[2009-07-01 07:48:35] ladislav at marek dot su
Description:
------------
Documentation says that Locale::filterMatches has two parameters, but
reflection shows three:
Method [ <internal:intl> static public method filterMatches ] {
- Parameters [3] {
Parameter #0 [ <required> $arg1 ]
Parameter #1 [ <required> $arg2 ]
Parameter #2 [ <required> $arg3 ]
}
}
And in OO example is used incorrect method name Locale::filter_matches
instead of Locale::filterMatches.
http://docs.php.net/manual/en/locale.filtermatches.php
Reproduce code:
---------------
var_dump(Locale::filterMatches('de-DE-1996', 'de-DE'));
Expected result:
----------------
bool(%b)
Actual result:
--------------
Warning: Locale::filterMatches() expects exactly 3 parameters, 2 given
in %s on line %n
bool(false)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48751&edit=1