Bug->Doc #53996 [Opn]: resourcebundle_locales return locales with null/false/empty string parameter
| From: | cataphract@php.net | Date: | Sun, 13 Feb 2011 02:33:48 +0000 |
| Subject: | Bug->Doc #53996 [Opn]: 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-5981@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=53996&edit=1
ID: 53996
Updated by: cataphract@php.net
Reported by: jinmoku at hotmail dot com
Summary: resourcebundle_locales return locales with
null/false/empty string parameter
Status: Open
-Type: Bug
+Type: Documentation Problem
Package: I18N and L10N related
PHP Version: 5.3.5
Block user comment: N
Private report: N
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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 http://bugs.php.net/bug.php?id=53996&edit=1