php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32667 ldap_sort() multivalue issue
Submitted: 2005-04-11 11:34 UTC Modified: 2005-04-11 17:33 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: b dot hallinger at ergonaz dot net Assigned:
Status: Not a bug Package: LDAP related
PHP Version: 4.3.10 OS: Linux Debian (Sarge)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: b dot hallinger at ergonaz dot net
New email:
PHP Version: OS:

 

 [2005-04-11 11:34 UTC] b dot hallinger at ergonaz dot net
Description:
------------
Hello,
there is a issue if you want to sort your searchresult by multivalued attributes.

ldap_sort() works fine, but only if you sort by singlevalued attributes.

Reproduce code:
---------------
I don't post code here, because its trivial. I will post an example dataset with two entries:

entry one:
sn=aaaa
id=1111
id=2222
id=3333

entry two:
sn=bbbb
id=6666
id=1000

Expected result:
----------------
If you sort by "id", the second entry should move to the first place, which he doesnt, because only the first vlaues of "id" got compared.



Actual result:
--------------
entry one remains entry one, although id=6666 is greater than id=1111!
ldap_sort() overlooks, that there is an id which is smaller (id=1000).

I think the solution to this could be to tell ldap_sort() to search for the biggest value in the multivalue attribute prior comparing with the other entries.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-11 17:33 UTC] sniper@php.net
We only wrap around the ldap_sort_entries() function.
Report this to e.g. openldap authors.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Mar 14 15:01:30 2025 UTC