From:             b dot hallinger at ergonaz dot net
Operating system: Linux Debian (Sarge)
PHP version:      4.3.10
PHP Bug Type:     LDAP related
Bug description:  ldap_sort() multivalue issue

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 bug report at http://bugs.php.net/?id=32667&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32667&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32667&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32667&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32667&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32667&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32667&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32667&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32667&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32667&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32667&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32667&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32667&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32667&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32667&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32667&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32667&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32667&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32667&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32667&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32667&r=mysqlcfg

Reply via email to