|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #54540 Allow loading of arbitrary resource bundles when fallback is disabled.
Submitted: 2011-04-15 14:38 UTC Modified: 2011-04-17 23:57 UTC
From: david dot zuelke at bitextender dot com Assigned: stas (profile)
Status: Closed Package: *Languages/Translation
PHP Version: 5.3.6 OS: Mac OS X 10.6.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
15 - 1 = ?
Subscribe to this entry?

 [2011-04-15 14:38 UTC] david dot zuelke at bitextender dot com
ResourceBundle::__construct() uses ures_open(), which performs validity checks on 
the given locale identifier. That's reasonable, as the fallback functionality only 
works with proper locale IDs (example: you pass "de_DE", but no such bundle exist, 
it will then use the bundle "de" if that exists).

With the fallback flag off (third ctor argument), ures_open is still used. This 
won't allow loading of data in invalid identifiers, such as some of ICU's built-in 
data (e.g. "supplementalData").

Attached is a patch that uses ures_openDirect() if the fallback flag is off. Tests 
are also included.


resbundle_uresopen (last revision 2011-04-15 12:38 UTC by david dot zuelke at bitextender dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-04-15 14:40 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: stas
 [2011-04-15 14:40 UTC]
Stas, please check this. Thanks!
 [2011-04-17 23:56 UTC]
Automatic comment from SVN on behalf of stas
Log: implement FR #54540 - Allow loading of arbitrary resource bundles when fallback is disabled
 [2011-04-17 23:57 UTC]
-Status: Assigned +Status: Closed
 [2011-04-17 23:57 UTC]
Applied, thanks
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu May 06 04:01:23 2021 UTC