php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70484 selectordinal doesn't work with named parameters
Submitted: 2015-09-13 21:35 UTC Modified: -
From: sam at rmcreative dot ru Assigned:
Status: Closed Package: intl (PECL)
PHP Version: 5.5.29 OS: Windows 8.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: sam at rmcreative dot ru
New email:
PHP Version: OS:

 

 [2015-09-13 21:35 UTC] sam at rmcreative dot ru
Description:
------------
intl 51.2 errors out when trying to create a pattern with named parameter {n} (or any other name) used in "selectordinal". It should work as in case with "plural" and all other patterns.

Positional placeholder {0} works as expected.

Test script:
---------------
<?php
$m = new MessageFormatter('en', '{n, selectordinal, one{#-one} two{#-two} few{#-few} other{#-other}}');
var_dump($m->format(array('n' => 42)));

Expected result:
----------------
42-two

Actual result:
--------------
{n, selectordinal, one{#-one} two{#-two} few{#-few} other{#-other}}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-04-11 13:02 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28b6f66a77d660412766b6da88d01377cbdd04a1
Log: Fixed bug #70484 selectordinal doesn't work with named parameters
 [2016-04-11 13:02 UTC] ab@php.net
-Status: Open +Status: Closed
 [2016-06-02 10:21 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=22336db97f0a61260e31b423036324bb95b1ff28
Log: Fixed bug #70484 selectordinal doesn't work with named parameters
 [2016-07-20 11:32 UTC] davey@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=28b6f66a77d660412766b6da88d01377cbdd04a1
Log: Fixed bug #70484 selectordinal doesn't work with named parameters
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 05:01:29 2024 UTC