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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 21:01:29 2024 UTC