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

Bug #16738 Problem parsing filter
Submitted: 2009-10-24 19:53 UTC Modified: 2009-10-28 08:03 UTC
From: brenard Assigned: beni
Status: Closed Package: Net_LDAP2 (version 2.0.6)
PHP Version: 5.2.1 OS: Debian Sid
Roadmaps: 2.1.0    
Subscription  


 [2009-10-24 19:53 UTC] brenard (Benjamin Renard)
Description: ------------ Hello, I want to parse filter string with Net_LDAP2_Filter :: parse() : My filter is : "(&(&(objectClass=posixgroup)(objectClass=lsgroup))(uniquemember=uid=eeggs,ou=people,o=ls))" But an error occured : Net_LDAP2_Filter combine error: parameter $filters is not an array or contains less than two Net_LDAP2_Filter objects! Visibly, it's a regexp problem in Net/LDAP2/Filter.php file on line 297 but I have not found a solution. Thank you for your work, BR Test script: --------------- <?php require('Net/LDAP2.php'); $filter = "(&(&(objectClass=posixgroup)(objectClass=lsgroup))(uniquemember=uid=eeggs,ou=people,o=ls))"; $result = Net_LDAP2_Filter :: parse($filter); if (Net_LDAP2::isError($result)) { print $result->getMessage()."\n"; } else { print "Filter : ".$result->asString()."\n"; } ?> Expected result: ---------------- "(&(&(objectClass=posixgroup)(objectClass=lsgroup))(uniquemember=uid=eeggs,ou=people,o=ls))" Actual result: -------------- Net_LDAP2_Filter combine error: parameter $filters is not an array or contains less than two Net_LDAP2_Filter objects!

Comments

 [2009-10-27 08:41 UTC] beni (Benedikt Hallinger)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: beni
 [2009-10-27 08:41 UTC] beni (Benedikt Hallinger)
-Roadmap Versions: +Roadmap Versions: 2.1.0
 [2009-10-27 11:00 UTC] beni (Benedikt Hallinger)
-Status: Assigned +Status: Verified
Hello, Thank you for reporting this bug. I have fixed it in SVN rev 289978. Please, could yu use the latest Filter.php (http://svn.php.net/viewvc/pear/packages/Net_LDAP2/trunk/LDAP2/Filter.php?revision=289978&view=co) and verify, the bug is fixed? If your feedback is positive, i will release a new package and close the bug report. Thank you very much! Beni
 [2009-10-27 19:49 UTC] brenard (Benjamin Renard)
-Status: Verified +Status: Open
It's work fine ! Thank you very much for your rapidity !
 [2009-10-28 08:03 UTC] beni (Benedikt Hallinger)
-Status: Assigned +Status: Closed
This bug has been fixed in SVN. 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. Thank you very much for the feedback! I will close the ticket now and prepare a new release. It should become available today.