com php-src: Fixes bug #74705 Wrong ReflectionInfo for Collator::getSortKey(): ext/intl/collator/collator_class.c ext/intl/tests/bug74705.phpt

From: Date: Tue, 13 Jun 2017 06:46:47 +0000
Subject: com php-src: Fixes bug #74705 Wrong ReflectionInfo for Collator::getSortKey(): ext/intl/collator/collator_class.c ext/intl/tests/bug74705.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98069@lists.php.net to get a copy of this message
Commit: 5f07a895cc340fea081938731f0c9c3b967f062f Author: Tyson Andre <tysonandre775@hotmail.com> Wed, 7 Jun 2017 21:32:57 -0700 Committer: Remi Collet <remi@php.net> Tue, 13 Jun 2017 08:46:47 +0200 Parents: aea8c6ddc18b9e44dd4baec2c6827bc08f40a0bd Branches: PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5f07a895cc340fea081938731f0c9c3b967f062f Log: Fixes bug #74705 Wrong ReflectionInfo for Collator::getSortKey() https://secure.php.net/manual/en/collator.getsortkey.php Bugs: https://bugs.php.net/74705 Changed paths: M ext/intl/collator/collator_class.c A ext/intl/tests/bug74705.phpt Diff: diff --git a/ext/intl/collator/collator_class.c b/ext/intl/collator/collator_class.c index 0821cb1..26917fd 100644 --- a/ext/intl/collator/collator_class.c +++ b/ext/intl/collator/collator_class.c @@ -119,7 +119,7 @@ zend_function_entry Collator_class_functions[] = { PHP_NAMED_FE( getLocale, ZEND_FN( collator_get_locale ), collator_1_arg ) PHP_NAMED_FE( getErrorCode, ZEND_FN( collator_get_error_code ), collator_0_args ) PHP_NAMED_FE( getErrorMessage, ZEND_FN( collator_get_error_message ), collator_0_args ) - PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_2_args ) + PHP_NAMED_FE( getSortKey, ZEND_FN( collator_get_sort_key ), collator_1_arg ) PHP_FE_END }; /* }}} */ diff --git a/ext/intl/tests/bug74705..phpt b/ext/intl/tests/bug74705.phpt new file mode 100644 index 0000000...f26dfe5 --- /dev/null +++ b/ext/intl/tests/bug74705.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #74705 Wrong reflection on Collator::getSortKey +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +<?php if (version_compare(INTL_ICU_VERSION, '51.2') >= 0) die('skip for ICU < 51.2'); ?> +--FILE-- +<?php +$rm = new ReflectionMethod(Collator::class, 'getSortKey'); +var_dump($rm->getNumberOfParameters()); +var_dump($rm->getNumberOfRequiredParameters()); + +$rf = new ReflectionFunction('collator_get_sort_key'); +var_dump($rf->getNumberOfParameters()); +var_dump($rf->getNumberOfRequiredParameters()); +?> +===DONE=== +--EXPECT-- +int(1) +int(1) +int(2) +int(2) +===DONE===

« previous php.cvs (#98069) next »