diff options
author | Fabien Villepinte <fabien.villepinte@gmail.com> | 2017-04-13 13:25:13 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2017-04-13 13:21:05 +0100 |
commit | f05d74feb886acfd9c9828158ff9af532ff4a75f (patch) | |
tree | 126d933adcc5a7fa757f2a403a3cfdb1f684cbab | |
parent | da41afeb4867244c1e37bf00143319c342aac081 (diff) | |
download | php-git-f05d74feb886acfd9c9828158ff9af532ff4a75f.tar.gz |
Fixed bug #74433 Wrong reflection on the Normalizer methods
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/intl/normalizer/normalizer_class.c | 11 | ||||
-rw-r--r-- | ext/intl/tests/bug74433.phpt | 20 |
3 files changed, 28 insertions, 6 deletions
@@ -21,6 +21,9 @@ PHP NEWS . Fixed bug #74343 (compile fails on solaris 11 with system gd2 library). (krakjoe) +- intl: + . Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa) + - MySQLnd: . Fixed bug #74376 (Invalid free of persistent results on error/connection loss). (Yussuf Khalil) diff --git a/ext/intl/normalizer/normalizer_class.c b/ext/intl/normalizer/normalizer_class.c index 93a5624663..894a3893f7 100644 --- a/ext/intl/normalizer/normalizer_class.c +++ b/ext/intl/normalizer/normalizer_class.c @@ -29,10 +29,9 @@ zend_class_entry *Normalizer_ce_ptr = NULL; /* {{{ Normalizer methods arguments info */ -ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 ) - ZEND_ARG_INFO( 0, arg1 ) - ZEND_ARG_INFO( 0, arg2 ) - ZEND_ARG_INFO( 0, arg3 ) +ZEND_BEGIN_ARG_INFO_EX( normalizer_args, 0, 0, 1 ) + ZEND_ARG_INFO( 0, input ) + ZEND_ARG_INFO( 0, form ) ZEND_END_ARG_INFO() /* }}} */ @@ -42,8 +41,8 @@ ZEND_END_ARG_INFO() */ zend_function_entry Normalizer_class_functions[] = { - ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) - ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) + ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) + ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC ) PHP_FE_END }; /* }}} */ diff --git a/ext/intl/tests/bug74433.phpt b/ext/intl/tests/bug74433.phpt new file mode 100644 index 0000000000..7919c87540 --- /dev/null +++ b/ext/intl/tests/bug74433.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #74433 Wrong reflection on the Normalizer methods +--SKIPIF-- +<?php if (!extension_loaded('intl')) die('skip intl extension not available'); ?> +--FILE-- +<?php +$rm = new ReflectionMethod(Normalizer::class, 'isNormalized'); +var_dump($rm->getNumberOfParameters()); +var_dump($rm->getNumberOfRequiredParameters()); +$rm = new ReflectionMethod(Normalizer::class, 'normalize'); +var_dump($rm->getNumberOfParameters()); +var_dump($rm->getNumberOfRequiredParameters()); +?> +===DONE=== +--EXPECT-- +int(2) +int(1) +int(2) +int(1) +===DONE=== |