Better error reporting
[squirrelmail.git] / functions / addressbook.php
index 6e18d1b68af864cb53197c44e27e871532e83472..d35e9eeaeee0c23548a0d11766565cd655399c56 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Functions require SM_PATH and support of forms.php functions
  *
- * @copyright © 1999-2005 The SquirrelMail Project Team
+ * @copyright © 1999-2006 The SquirrelMail Project Team
  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  * @version $Id$
  * @package squirrelmail
@@ -621,7 +621,7 @@ class AddressBook {
             if (is_array($res)) {
                return $res;
             } else {
-               $this->error = htmlspecialchars($backend->error);
+               $this->error = htmlspecialchars($this->backends[$bnum]->error);
                return false;
             }
         }
@@ -967,4 +967,4 @@ if((isset($addrbook_dsn) && !empty($addrbook_dsn)) ||
  */
 do_hook('abook_add_class');
 
-?>
\ No newline at end of file
+?>