[Bug 882] New - addressbook add fails

bugs@bugs.horde.org bugs@bugs.horde.org
Wed, 20 Feb 2002 22:23:48 -0400


http://bugs.horde.org/show_bug.cgi?id=882

*** shadow/882	Wed Feb 20 22:23:48 2002
--- shadow/882.tmp.23611	Wed Feb 20 22:23:48 2002
***************
*** 0 ****
--- 1,28 ----
+ Bug#: 882
+ Product: Horde
+ Version: 2.0 Stable
+ Platform: PHP Code
+ OS/Version: All
+ Status: NEW   
+ Resolution: 
+ Severity: normal
+ Priority: P2
+ Component: Turba
+ Area: BUILD
+ AssignedTo: chuck@horde.org                            
+ ReportedBy: bg.misc@infofiend.com               
+ URL: 
+ Summary: addressbook add fails
+ 
+ The address book addition from an email message fails saying "address already in
+ addressbook".  This is due to an error in turbaAddAddress, it expects
+ $driver->search to return an array, then uses count($res) to determine the size
+ of that array, assuming that if no matching addresses are found, count($res)
+ will return 0.  Unfortunately Turba_Source->search returns a Turba_List so the
+ function should be $res->count().
+ 
+ Diff output:
+ 94c94
+ <     if (PEAR::isError($res) || count($res) > 0) {
+ ---
+ >     if (PEAR::isError($res) || $res->count() > 0) {