PHP :: Doc Bug #74953 :: Locale::getDisplayName has inconsistent 2nd argument
php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74953 Locale::getDisplayName has inconsistent 2nd argument
Submitted: 2017-07-19 17:30 UTC Modified: 2018-03-09 12:54 UTC
Votes:2
Avg. Score:1.0 ± 0.0
Reproduced:0 of 2 (0.0%)
From: franssen dot roland at gmail dot com Assigned: cmb (profile)
Status: Closed 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)"
 [2018-03-09 12:52 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Assigned To: +Assigned To: cmb
 [2018-03-09 12:52 UTC] cmb@php.net
Indeed, a documentation issue.
 [2018-03-09 12:53 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&revision=344473
Log: Fix bug #74953: Locale::getDisplayName has inconsistent 2nd argument

--
Provided by anonymous 88937 (carusogabriel34@gmail.com)
 [2018-03-09 12:54 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2018-03-09 12:54 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Wed Aug 15 04:01:25 2018 UTC