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
 [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

Pull Requests

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.
 [2020-02-07 06:05 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=dda28ddda643c442e40b428ccb8f0d65f75686b1
Log: Fix bug #74953: Locale::getDisplayName has inconsistent 2nd argument
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC