|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54176 locale_compose accepts more than 3 extlang
Submitted: 2011-03-07 08:43 UTC Modified: 2017-09-12 14:07 UTC
Avg. Score:1.5 ± 0.5
Reproduced:0 of 2 (0.0%)
From: giorgio dot liscio at email dot it Assigned:
Status: Verified Package: intl (PECL)
PHP Version: 5.3.5 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: giorgio dot liscio at email dot it
New email:
PHP Version: OS:


 [2011-03-07 08:43 UTC] giorgio dot liscio at email dot it
hi, just a "cosmetic problem"

probably are affected variants and privates too

bad result:

$arr = array(
    'language'=>'en' ,
    'script'  =>'Hans' ,
    'region'  =>'CN'
    'extlang' => array('a','b','c','d','e','f')
echo locale_compose( $arr );

good result:

$arr = array(
    'language'=>'en' ,
    'script'  =>'Hans' ,
    'region'  =>'CN'
    'extlang0' => 'a',
    'extlang1' => 'b',
    'extlang2' => 'c',
    'extlang3' => 'd'
echo locale_compose( $arr );


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-12 14:07 UTC]
-Status: Open +Status: Verified -Package: I18N and L10N related +Package: intl
 [2017-09-12 14:07 UTC]
See <> (correct behavior) vs.
<> (erroneous behavior, since only up to
three extlangs are supposed to be supported).

Apparently, the max_value which is regarded for multiple numbered
keys [1] is ignored for the single array case[2].

[1] <>
[2] <>
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Jan 21 12:01:23 2021 UTC