ID: 32667 Updated by: [EMAIL PROTECTED] Reported By: b dot hallinger at ergonaz dot net -Status: Open +Status: Bogus Bug Type: LDAP related Operating System: Linux Debian (Sarge) PHP Version: 4.3.10 New Comment:
We only wrap around the ldap_sort_entries() function. Report this to e.g. openldap authors. Previous Comments: ------------------------------------------------------------------------ [2005-04-11 11:34:43] 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. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32667&edit=1