php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #30675 Why ldap_sort() not using strcoll instead strcmp?
Submitted: 2004-11-03 16:56 UTC Modified: 2016-03-10 10:03 UTC
Votes:5
Avg. Score:4.6 ± 0.5
Reproduced:5 of 5 (100.0%)
Same Version:1 (20.0%)
Same OS:1 (20.0%)
From: aszuts at jobmail dot hu Assigned: mcmic (profile)
Status: Closed Package: LDAP related
PHP Version: 4.3.9 OS: Debian Linux
Private report: No CVE-ID: None
 [2004-11-03 16:56 UTC] aszuts at jobmail dot hu
Description:
------------
In ext/ldap/ldap.c line 1554. stay:

(ldap_sort_entries(ld->link, (LDAPMessage **) &le->ptr, sflen ? sortfilter : NULL, strcmp)

It uses strcmp to compare LDAP result on the client side. IMHO it will be better to use locale sensitive strcoll or give a PHP-API paramater to set comparision function manually!

Thanks 
  Atti


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-25 13:34 UTC] cmb@php.net
-Package: Feature/Change Request +Package: LDAP related
 [2016-03-10 10:03 UTC] mcmic@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: mcmic
 [2016-03-10 10:03 UTC] mcmic@php.net
ldap_sort is deprecated since PHP-7.

Please use PHP array sorting functions for this: http://php.net/manual/en/array.sorting.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC