php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74953 Locale::getDisplayName has inconsistent 2nd argument
Submitted: 2017-07-19 17:30 UTC Modified: -
Votes:2
Avg. Score:1.0 ± 0.0
Reproduced:0 of 2 (0.0%)
From: franssen dot roland at gmail dot com Assigned:
Status: Open Package: I18N and L10N related
PHP Version: 7.2.0alpha3 OS: 3v4l.org
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: franssen dot roland at gmail dot com
New email:
PHP Version: OS:

 

 [2017-07-19 17:30 UTC] franssen dot roland at gmail dot com
Description:
------------
Basically https://3v4l.org/mIf1N 

getDisplayName($some, null) behaves different compared to getDisplayName($some)


> http://php.net/manual/en/locale.getdisplayname.php
> If is NULL then the default locale is used.

That is simply not true.

Thanks!

Related to https://bugs.php.net/bug.php?id=74439 maybe?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-09-20 19:51 UTC] hsn at outlook dot hu
>  Returns an appropriately localized display name for the input locale. If is NULL then the default locale is used.

if is null refers to the $local variable,

var_dump(\Locale::getDisplayName(null));

>> Output: "Nederlands (Nederland)"
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC