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

Bug #13200 Adding an entry and afterwards modifying the same object wants to readd entry
Submitted: 2008-02-25 14:08 UTC
From: beni Assigned: beni
Status: Closed Package: Net_LDAP (version 1.1.0a2)
PHP Version: 5.2.4 OS:
Roadmaps: 1.1.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 + 44 = ?

 
 [2008-02-25 14:08 UTC] beni (Benedikt Hallinger)
Description: ------------ If a fresh entry is created, that gots added to the directory server and after that, the same object is going to be modified, Net_LDAP tries to add that entry again. Net_LDAP->modify() calls Entry->update() internally, so most probably something inside update() is not cleaned properly after updating the entrys internal data. Test script: --------------- $entry = Net_LDAP_Entry::createFresh( 'ou=Net_LDAP_Test_modify,'.$this->ldapcfg['global']['server_base_dn'], array( 'objectClass' => array('top','organizationalUnit'), 'ou' => 'Net_LDAP_Test_subdelete', 'street' => 'Beniroad', 'telephoneNumber' => array('1234', '5678'), 'postalcode' => '12345', 'facsimileTelephoneNumber' => array('123','456') )); $changes = array( 'add' => array( 'businessCategory' => array('foocat', 'barcat'), 'description' => 'testval' ), 'delete' => array('seeAlso'), 'replace' => array('telephoneNumber' => array('345', '567')), 'changes' => array( 'replace' => array('street' => 'Highway to Hell'), 'add' => array('l' => 'someLocality'), 'delete' => array( 'postalcode', 'facsimileTelephoneNumber' => array('123')) ) ); $ret = $ldap->modify($actual_entry, $changes); if (is_a($ret, 'Net_LDAP_Error')) die('ERROR: '.$ret->getMessage()); Expected result: ---------------- No error occuring. Entry should be present in the server with modifications applied. Actual result: -------------- Net_LDAP_Error complaining about the entry already existing.

Comments

 [2008-02-27 07:43 UTC] beni (Benedikt Hallinger)
Maybe relatet to Bug #13228
 [2008-02-27 08:59 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.