From: Fabien Villepinte Date: Thu, 13 Apr 2017 11:25:13 +0000 (+0200) Subject: Fixed bug #74433 Wrong reflection on the Normalizer methods X-Git-Tag: php-7.0.19RC1~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f05d74feb886acfd9c9828158ff9af532ff4a75f;p=php Fixed bug #74433 Wrong reflection on the Normalizer methods --- diff --git a/NEWS b/NEWS index 5e4e1f49d6..d664db7e6a 100644 --- a/NEWS +++ b/NEWS @@ -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-- + +--FILE-- +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===