|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74705 Wrong reflection on Collator::getSortKey and collator_get_sort_key,
Submitted: 2017-06-08 04:47 UTC Modified: 2017-06-13 06:49 UTC
From: tandre at themeetgroup dot com Assigned: remi (profile)
Status: Closed Package: intl (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2017-06-08 04:47 UTC] tandre at themeetgroup dot com
The Collator::getSortKey() method and the collator_get_sort_key() functions have one extra parameter by reflection compared to the documentation (

If we call the method with 2 parameters the following warning is emitted:
Warning: Collator::getSortKey() expects exactly 1 parameter, 2 given
(Same type of bug as, different method)

Test script:

$method = new ReflectionMethod('Collator', 'getSortKey');
$method = new ReflectionFunction('collator_get_sort_key');

// outputs 2, 2, 3, 3,

Expected result:
The ReflectionMethod parameters should have 1 parameter, the ReflectionFunction should expect 2 parameters

Actual result:
The ReflectionMethod parameters has parameters, the ReflectionFunction has 3 parameters


getSortKey.patch (last revision 2017-06-08 04:48 UTC by tandre at themeetgroup dot com)

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-06-13 06:45 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: remi
 [2017-06-13 06:49 UTC]
-Summary: Wrong reflection on Collator::getSortKey +Summary: Wrong reflection on Collator::getSortKey and collator_get_sort_key,
 [2017-06-13 06:50 UTC]
Automatic comment on behalf of remi
Log: Fix bug #74705 for collator_get_sort_key
 [2017-06-13 06:50 UTC]
-Status: Assigned +Status: Closed
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Dec 02 09:01:27 2023 UTC