php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #74467 The fallback parameter of ResourceBundle::get is undocumented
Submitted: 2017-04-18 11:17 UTC Modified: 2017-04-20 15:42 UTC
From: fabien dot villepinte at gmail dot com Assigned: cmb (profile)
Status: Closed Package: intl (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: fabien dot villepinte at gmail dot com
New email:
PHP Version: OS:

 

 [2017-04-18 11:17 UTC] fabien dot villepinte at gmail dot com
Description:
------------
The ResourceBundle::get() method and the resourcebundle_get() function have an undocumented optional parameter: fallback (bool, default true)

See the doc: http://php.net/manual/en/resourcebundle.get.php

The related code: https://github.com/php/php-src/blob/b78b15e88022b70ce6810f8b8dd1e42c2dac44b3/ext/intl/resourcebundle/resourcebundle_class.c#L259

Test script:
---------------
<?php

$rm = new ReflectionMethod(ResourceBundle::class, 'get');
var_dump($rm->getParameters()[1]->getName());
var_dump($rm->getParameters()[1]->isOptional());

$rf = new ReflectionFunction('resourcebundle_get');
var_dump($rf->getParameters()[2]->getName());
var_dump($rf->getParameters()[2]->isOptional());

Actual result:
--------------
string(8) "fallback"
bool(true)
string(8) "fallback"
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-19 15:51 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2017-04-19 15:59 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=342390
Log: Fix #74467: The fallback parameter of ResourceBundle::get is undocumented
 [2017-04-19 15:59 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2017-04-19 15:59 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.
 [2017-04-20 15:14 UTC] fabien dot villepinte at gmail dot com
-Status: Closed +Status: Assigned
 [2017-04-20 15:14 UTC] fabien dot villepinte at gmail dot com
The fallback parameter has been added only for ResourceBundle::get() but not for resourcebundle_get(). Both are equally concerned.
 [2017-04-20 15:42 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=342403
Log: #74467	The fallback parameter of resourcebundle_get is undocumented
 [2017-04-20 15:42 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2017-04-20 15:42 UTC] cmb@php.net
Thanks for double-checking! Should be fixed now.
 [2020-02-07 06:06 UTC] phpdocbot@php.net
Automatic comment on behalf of cmb
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=b16044a08823dc988986f819af43dd86c79b695e
Log: Fix #74467: The fallback parameter of ResourceBundle::get is undocumented
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC