Skip to content

Commit ec3d864

Browse files
committed
Fixed bug #75318 (The parameter of UConverter::getAliases() is not optional)
Of course, reflection has to know that as well.
1 parent 6b9ccda commit ec3d864

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ PHP NEWS
1717
. Fixed bug #75311 (error: 'zend_hash_key' has no member named 'arKey' in
1818
apache2handler). (mcarbonneaux)
1919

20+
- Intl:
21+
. Fixed bug #75318 (The parameter of UConverter::getAliases() is not
22+
optional). (cmb)
23+
2024
- OCI8:
2125
. Fixed incorrect reference counting. (Dmitry, Tianfang Yang)
2226

ext/intl/converter/converter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ static PHP_METHOD(UConverter, getAvailable) {
897897
/* }}} */
898898

899899
/* {{{ proto array UConverter::getAliases(string name) */
900-
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0)
900+
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1)
901901
ZEND_ARG_INFO(0, name)
902902
ZEND_END_ARG_INFO();
903903
static PHP_METHOD(UConverter, getAliases) {

ext/intl/tests/bug75318.phpt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
Bug #75318 (The parameter of UConverter::getAliases() is not optional)
3+
--SKIP--
4+
<?php
5+
if (!extension_loaded('intl')) die('skip intl extension is not available');
6+
?>
7+
--FILE--
8+
<?php
9+
$rm = new ReflectionMethod('UConverter', 'getAliases');
10+
var_dump($rm->getNumberOfRequiredParameters());
11+
?>
12+
===DONE===
13+
--EXPECT--
14+
int(1)
15+
===DONE===

0 commit comments

Comments
 (0)