Skip to content

Commit

Permalink
Fixed bug #75318 (The parameter of UConverter::getAliases() is not op…
Browse files Browse the repository at this point in the history
…tional)

Of course, reflection has to know that as well.
  • Loading branch information
cmb69 committed Oct 6, 2017
1 parent 6b9ccda commit ec3d864
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ PHP NEWS
. Fixed bug #75311 (error: 'zend_hash_key' has no member named 'arKey' in
apache2handler). (mcarbonneaux)

- Intl:
. Fixed bug #75318 (The parameter of UConverter::getAliases() is not
optional). (cmb)

- OCI8:
. Fixed incorrect reference counting. (Dmitry, Tianfang Yang)

Expand Down
2 changes: 1 addition & 1 deletion ext/intl/converter/converter.c
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ static PHP_METHOD(UConverter, getAvailable) {
/* }}} */

/* {{{ proto array UConverter::getAliases(string name) */
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 0)
ZEND_BEGIN_ARG_INFO_EX(php_converter_getaliases_arginfo, 0, ZEND_RETURN_VALUE, 1)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO();
static PHP_METHOD(UConverter, getAliases) {
Expand Down
15 changes: 15 additions & 0 deletions ext/intl/tests/bug75318.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--TEST--
Bug #75318 (The parameter of UConverter::getAliases() is not optional)
--SKIP--
<?php
if (!extension_loaded('intl')) die('skip intl extension is not available');
?>
--FILE--
<?php
$rm = new ReflectionMethod('UConverter', 'getAliases');
var_dump($rm->getNumberOfRequiredParameters());
?>
===DONE===
--EXPECT--
int(1)
===DONE===

0 comments on commit ec3d864

Please sign in to comment.