Doc #53995 [Opn->Fbk]: resourcebundle_locales wait a string

From: Date: Mon, 05 Dec 2011 21:36:33 +0000
Subject: Doc #53995 [Opn->Fbk]: resourcebundle_locales wait a string
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-7585@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=53995&edit=1 ID: 53995 Updated by: frozenfire@php.net Reported by: jinmoku at hotmail dot com Summary: resourcebundle_locales wait a string -Status: Open +Status: Feedback Type: Documentation Problem Package: I18N and L10N related PHP Version: 5.3.5 -Assigned To: +Assigned To: frozenfire Block user comment: N Private report: N New Comment: I've fixed and clarified the documentation. Can you please confirm that I've done so correctly? I'm not familiar with the extension, but the sources for it are somewhat clear. Previous Comments: ------------------------------------------------------------------------ [2011-12-05 21:35:35] frozenfire@php.net Automatic comment from SVN on behalf of frozenfire Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=320463 Log: Fixed and clarified both the procedural and OOP variants, and updated examples. Addresses bug #53995. ------------------------------------------------------------------------ [2011-06-13 19:06:17] franssen dot roland at gmail dot com The argument must be the bundle name (e.g. "/usr/data/resources"). I agree the docs are unclear on this. ------------------------------------------------------------------------ [2011-02-11 14:57:54] jinmoku at hotmail dot com sorry Actual result: -------------- Warning: resourcebundle_locales() expects parameter 1 to be string, object given in C:\www\test\index.php on line 6 Warning: resourcebundle_locales(): resourcebundle_locales: unable to parse input params in C:\www\test\index.php on line 6 Warning: join(): Invalid arguments passed in C:\www\test\index.php on line 6 Warning: ResourceBundle::getLocales() expects exactly 1 parameter, 0 given in C:\www\test\index.php on line 9 Warning: ResourceBundle::getLocales(): resourcebundle_locales: unable to parse input params in C:\www\test\index.php on line 9 Warning: join(): Invalid arguments passed in C:\www\test\index.php on line 9 ------------------------------------------------------------------------ [2011-02-11 14:55:30] jinmoku at hotmail dot com Description: ------------ doc : http://fr.php.net/manual/en/resourcebundle.locales.php Object oriented style array ResourceBundle::getLocales ( void ) Procedural style array resourcebundle_locales ( ResourceBundle $r ) -- CORRECT TEST SCRIPT -- <?php $bundle = realpath('./ressource'); $r = resourcebundle_locales($bundle); echo join("\n", $r); $r = ResourceBundle::getLocales($bundle); echo join("\n", $r); Test script: --------------- <?php $bundle = realpath('./ressource'); $r = resourcebundle_create( 'es', $bundle); echo join("\n", resourcebundle_locales($r)); $r = new ResourceBundle( 'es', $bundle); echo join("\n", $r->getLocales()); Expected result: ---------------- es rootes root Actual result: -------------- <?php $bundle = realpath('./ressource'); $r = resourcebundle_create( 'es', $bundle); echo join("\n", resourcebundle_locales($r)); $r = new ResourceBundle( 'es', $bundle); echo join("\n", $r->getLocales()); ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=53995&edit=1

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