Skip to content

Commit bd32837

Browse files
committed
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fixed bug #74433 Wrong reflection on the Normalizer methods
2 parents f70328b + f05d74f commit bd32837

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

NEWS

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ PHP NEWS
3535
. Fixed bug #65683 (Intl does not support DateTimeImmutable). (Ben Scholzen)
3636
. Fixed bug #74298 (IntlDateFormatter->format() doesn't return
3737
microseconds/fractions). (Andrew Nester)
38+
. Fixed bug #74433 (wrong reflection for Normalizer methods). (villfa)
3839

3940
- OpenSSL:
4041
. Fixed bug #74341 (openssl_x509_parse fails to parse ASN.1 UTCTime without

ext/intl/normalizer/normalizer_class.c

+5-6
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ zend_class_entry *Normalizer_ce_ptr = NULL;
2929

3030
/* {{{ Normalizer methods arguments info */
3131

32-
ZEND_BEGIN_ARG_INFO_EX( normalizer_3_args, 0, 0, 3 )
33-
ZEND_ARG_INFO( 0, arg1 )
34-
ZEND_ARG_INFO( 0, arg2 )
35-
ZEND_ARG_INFO( 0, arg3 )
32+
ZEND_BEGIN_ARG_INFO_EX( normalizer_args, 0, 0, 1 )
33+
ZEND_ARG_INFO( 0, input )
34+
ZEND_ARG_INFO( 0, form )
3635
ZEND_END_ARG_INFO()
3736

3837
/* }}} */
@@ -42,8 +41,8 @@ ZEND_END_ARG_INFO()
4241
*/
4342

4443
zend_function_entry Normalizer_class_functions[] = {
45-
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
46-
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_3_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
44+
ZEND_FENTRY( normalize, ZEND_FN( normalizer_normalize ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
45+
ZEND_FENTRY( isNormalized, ZEND_FN( normalizer_is_normalized ), normalizer_args, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC )
4746
PHP_FE_END
4847
};
4948
/* }}} */

ext/intl/tests/bug74433.phpt

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #74433 Wrong reflection on the Normalizer methods
3+
--SKIPIF--
4+
<?php if (!extension_loaded('intl')) die('skip intl extension not available'); ?>
5+
--FILE--
6+
<?php
7+
$rm = new ReflectionMethod(Normalizer::class, 'isNormalized');
8+
var_dump($rm->getNumberOfParameters());
9+
var_dump($rm->getNumberOfRequiredParameters());
10+
$rm = new ReflectionMethod(Normalizer::class, 'normalize');
11+
var_dump($rm->getNumberOfParameters());
12+
var_dump($rm->getNumberOfRequiredParameters());
13+
?>
14+
===DONE===
15+
--EXPECT--
16+
int(2)
17+
int(1)
18+
int(2)
19+
int(1)
20+
===DONE===

0 commit comments

Comments
 (0)