Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.1.5

Bug #11579 Net_LDAP->dnExists() Returning False when DN Does Exist
Submitted: 2007-07-10 18:51 UTC
From: mysticode Assigned: beni
Status: Closed Package: Net_LDAP (version 1.0.0RC2)
PHP Version: Irrelevant OS:
Roadmaps: 1.0.0    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 50 + 17 = ?

 
 [2007-07-10 18:51 UTC] mysticode (David Leinbach)
Description: ------------ $ds->dnExists($dbDn) under 1.0.0RC2 is returning false while under 1.0.0RC1 returns true (correctly - the DN does exist)

Comments

 [2007-07-12 19:17 UTC] darryly (Darryl Yip)
I noticed a couple of things with the following line in function dnExists($dn): $base = Net_LDAP_Util::ldap_explode_dn($this->_newdn, array('casefolding' => 'none', 'reverse' => false, 'onlyvalues' => false)); 1.) $this->_newdn is actually NULL so I tried passing in $dn instead 2.) ldap_explode_dn is always reversing the array, so I commented out the code that sets $options['reverse'] (checking for isset will return true regardless of the boolean value assigned because it is mainly checking to see if the variable is set and not it's value) //!isset($options['reverse']) ? $options['reverse'] = false : $options['reverse'] = true; 3.) 'casefolding' is used in this line while 'casefold' is what is actually being referenced in ldap_explode_dn When I implemented those changes, dnExists is returning the correct value for me. Hope this helps. Thanks for the package...keep up the good work. Please let me know if you need me to clarify anything, thanks.
 [2007-07-16 07:27 UTC] beni (Benedikt Hallinger)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.