Doc #53996 [Com]: resourcebundle_locales return locales with null/false/empty string parameter

From: Date: Sun, 13 Feb 2011 02:41:08 +0000
Subject: Doc #53996 [Com]: 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-5982@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 Comment by: jinmoku at hotmail dot com Reported by: jinmoku at hotmail dot com Summary: resourcebundle_locales return locales with null/false/empty string parameter Status: Open Type: Documentation Problem Package: I18N and L10N related PHP Version: 5.3.5 Block user comment: N Private report: N New Comment: yep see my other report : http://bugs.php.net/bug.php?id=53995 Previous Comments: ------------------------------------------------------------------------ [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 http://bugs.php.net/bug.php?id=53996&edit=1

« previous php.doc.bugs (#5982) next »