Doc #53996 [Opn->Dup]: resourcebundle_locales return locales with null/false/empty string parameter
| From: | frozenfire@php.net | Date: | Wed, 07 Dec 2011 03:46:22 +0000 |
| Subject: | Doc #53996 [Opn->Dup]: resourcebundle_locales return locales with null/false/empty string parameter | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-7606@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=53996&edit=1
ID: 53996
Updated by: frozenfire@php.net
Reported by: jinmoku at hotmail dot com
Summary: resourcebundle_locales return locales with
null/false/empty string parameter
-Status: Open
+Status: Duplicate
Type: Documentation Problem
Package: I18N and L10N related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
Essentially a duplicate of bug #53995.
Previous Comments:
------------------------------------------------------------------------
[2011-02-13 03:41:08] jinmoku at hotmail dot com
yep see my other report :
http://bugs.php.net/bug.php?id=53995
------------------------------------------------------------------------
[2011-02-13 03:33:47] cataphract@php.net
It's the documentation that seems to be wrong. getLocales() is a static method in all similar
to resourcebundle_locales and both take a string. If they are given something that converts to a
string of length 0, they give they "fetch default locales list", and the source shows this
is clearly desired behavior.
------------------------------------------------------------------------
[2011-02-11 15:07:55] jinmoku at hotmail dot com
Description:
------------
resourcebundle_locales and ResourceBundle::getLocales
returns all locales with null/false/empty string parameter
Test script:
---------------
$r = resourcebundle_locales(''); //or false, null
echo join("\n", $r);
Expected result:
----------------
Warning: resourcebundle_locales(): Cannot fetch locales list in C:\www\test\index.php on line 3
Warning: join(): Invalid arguments passed in C:\www\test\index.php on line 4
Actual result:
--------------
af
af_ZA
am
am_ET
ar
ar_AE
ar_BH
ar_DZ
ar_EG
ar_IQ
ar_JO
ar_KW
ar_LB
ar_LY
ar_MA
ar_OM
ar_QA
ar_SA
ar_SD
ar_SY
ar_TN
ar_YE
as
as_IN
az
az_Cyrl
az_Cyrl_AZ
az_Latn
az_Latn_AZ
...
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=53996&edit=1