[Tickets #8595] 1-click add_address from message display fails with LDAP driver

bugs at horde.org bugs at horde.org
Tue Sep 22 12:46:33 UTC 2009


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/8595
------------------------------------------------------------------------------
  Ticket             | 8595
  Created By         | andydorman at comehome.net
  Summary            | 1-click add_address from message display fails with
                     | LDAP driver
  Queue              | Turba
  Version            | 2.3.2
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
  Owners             |
+New Attachment     | turba_lib_Driver_ldap_diff.txt
------------------------------------------------------------------------------


andydorman at comehome.net (2009-09-22 08:46) wrote:

The bug was noticed with the latest stable Turba (just updated to  
2.3.2) & 2.4.17 OpenLDAP for address and address book storage.

I noticed last week that clicking on the little "add" icon next to a  
new address (ie, an address not yet in my default address book) in the  
IMP message display gave me an error "Read failed: (0) Success"

Clicking on "add" for an existing address returned the correct  
"Already exists" result.

I found the issue to be the method, _get_results, in  
turba/lib/Driver/ldap.php, that checks the results of a search for a  
duplicate address before adding the new one .  When nothing is found  
(ie, the results array is empty), _get_results (line 491) considered  
that to be a PEAR error.  However, lack of results only means a search  
came up empty, not that there was an LDAP error.  We should check the  
error code before declaring a problem.

The good news is that fixing it, for OpenLDAP anyway, is simple.   
OpenLDAP returns an error code of 0 when there were no LDAP problems.   
So it was a simple matter to add a check of the error code before  
declaring that there was a problem.







More information about the bugs mailing list