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

Bug #16242 arguments for createFresh in wrong order
Submitted: 2009-05-20 19:19 UTC
From: emilwillems Assigned: beni
Status: Closed Package: Net_LDAP2 (version 2.0.0RC6)
PHP Version: 5.2.9 OS: Ubuntu Linux
Roadmaps: 2.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 : 25 + 9 = ?

 
 [2009-05-20 19:19 UTC] emilwillems (Emil Willems)
Description: ------------ In Entry.php, line 282 the call to createFresh has the argument listed in the wrong order. $entry becomes an PEAR_ERROR object and thus failing the instanceof Net_LDAP2_ERROR check, causing a fatal error on line 286: Fatal error: Call to undefined method PEAR_Error::markAsNew() in /usr/share/php/Net/LDAP2/Entry.php on line 286 Test script: --------------- No script attached, bug should be easily solvable using the description above.

Comments

 [2009-05-21 19:27 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Verified
Actually tests scripts really do help, because cvs can be different to the released version. I assume you are talking about: http://cvs.php.net/viewvc.cgi/pear/Net_LDAP2/LDAP2/Entry.php?view=markup#l276 282 $entry = Net_LDAP2_Entry::createFresh($attrs, $dn); vs 206 public static function createFresh($dn, $attrs = array())
 [2009-05-21 21:47 UTC] emilwillems (Emil Willems)
Yes, the call on line 282 has $attrs and $dn switched around, I've "fixed" my installation of Net_LDAP2 by changing the line to: $entry = Net_LDAP2_Entry::createFresh($dn, $attrs); Works perfectly now.
 [2009-05-26 19:29 UTC] beni (Benedikt Hallinger)
-Assigned To: +Assigned To: beni -Roadmap Versions: +Roadmap Versions: 2.0.0
 [2009-05-26 19:52 UTC] beni (Benedikt Hallinger)
-Status: Verified +Status: Closed
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.