php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #53996 resourcebundle_locales return locales with null/false/empty string parameter
Submitted: 2011-02-11 15:07 UTC Modified: 2011-12-07 03:46 UTC
From: jinmoku at hotmail dot com Assigned:
Status: Duplicate Package: I18N and L10N related
PHP Version: 5.3.5 OS:
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: jinmoku at hotmail dot com
New email:
PHP Version: OS:

 

 [2011-02-11 15:07 UTC] 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
...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-02-13 03:33 UTC] cataphract@php.net
-Type: Bug +Type: Documentation Problem
 [2011-02-13 03:33 UTC] 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-13 03:41 UTC] jinmoku at hotmail dot com
yep see my other report : 
http://bugs.php.net/bug.php?id=53995
 [2011-12-07 03:46 UTC] frozenfire@php.net
-Status: Open +Status: Duplicate
 [2011-12-07 03:46 UTC] frozenfire@php.net
Essentially a duplicate of bug #53995.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 07:01:28 2024 UTC