From:             
Operating system: Mac OS X 10.6.7
PHP version:      5.3.6
Package:          *Languages/Translation
Bug Type:         Feature/Change Request
Bug description:Allow loading of arbitrary resource bundles when fallback is 
disabled.

Description:
------------
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.


-- 
Edit bug report at http://bugs.php.net/bug.php?id=54540&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54540&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54540&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54540&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54540&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54540&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54540&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54540&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54540&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54540&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54540&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54540&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54540&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54540&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54540&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54540&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54540&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54540&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54540&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54540&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54540&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54540&r=mysqlcfg

Reply via email to