com php-src: Fixed bug #74433 Wrong reflection on the Normalizer methods: NEWS ext/intl/normalizer/normalizer_class.c ext/intl/test s/bug74433.phpt
| From: | Joe Watkins | Date: | Thu, 13 Apr 2017 12:21:05 +0000 |
| Subject: | com php-src: Fixed bug #74433 Wrong reflection on the Normalizer methods: NEWS ext/intl/normalizer/normalizer_class.c ext/intl/test s/bug74433.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-97579@lists.php.net to get a copy of this message | ||
Commit: f05d74feb886acfd9c9828158ff9af532ff4a75f
Author: Fabien Villepinte <fabien.villepinte@gmail.com> Thu, 13 Apr 2017 13:25:13
+0200
Committer: Joe Watkins <krakjoe@php.net> Thu, 13 Apr 2017 13:21:05 +0100
Parents: da41afeb4867244c1e37bf00143319c342aac081
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f05d74feb886acfd9c9828158ff9af532ff4a75f
Log:
Fixed bug #74433 Wrong reflection on the Normalizer methods
Bugs:
https://bugs.php.net/74433
Changed paths:
M NEWS
M ext/intl/normalizer/normalizer_class.c
A ext/intl/tests/bug74433.phpt
Diff:
diff --git a/NEWS b/NEWS
index 5e4e1f4..d664db7 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 93a5624..894a389 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 0000000..7919c87
--- /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===