#48441 [Bgs->Asn]: ldap_search() sizelimit, timelimit and deref options persist
ID: 48441
Updated by: jani@php.net
-Summary: ldap_search() makes sizelimit, timelimit and deref
options persistent
Reported By: patrickallaert@php.net
-Status: Bogus
+Status: Assigned
Bug Type: LDAP related
-Operating System:
+Operating System: *
-PHP Version: 5.3.0RC2
+PHP Version: 5.*, 6CVS (2009-06-01)
Assigned To: patrickallaert
New Comment:
Reopened. I misunderstood your report. :)
Note: bug fixes should go also to PHP_5_2.
Previous Comments:
------------------------------------------------------------------------
[2009-06-01 10:24:40] patrickallaert@php.net
I am not sure to understand your remark.
What I described here is the *current* way ldap_search() works.
If I'd like to set those options for all queries on the same link, I'd
rather use ldap_set_option() than side effects of ldap_search().
I fixed it locally and I am about to post my patch on internals for
review before commiting it to CVS (as I am rather new @php.net)
------------------------------------------------------------------------
[2009-06-01 09:02:39] jani@php.net
How about not. These kind of "magic" things tend to cause bugs that are
next to impossible to find.
------------------------------------------------------------------------
[2009-05-31 21:53:54] patrickallaert@php.net
Description:
------------
Specifiying sizelimit, timelimit and deref options in ldap_search()
makes them persistent for next call to ldap_search().
<?php
// ldap_search() with sizelimit, timelimit and deref options
ldap_search($link, $dn, $filter, $attrs, 1, 1, 1, LDAP_DEREF_ALWAYS);
// Default value not used for sizelimit, timelimit and deref, previous
one used.
// Returns same truncated (due to sizelimit) results as previous call
ldap_search($link, $dn, $filter, $attrs, 1);
?>
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48441&edit=1
Thread (5 messages)