From 281dfe0fee75c107a13de2c9f465accce9d07021 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 3 Sep 2013 16:05:32 +0000 Subject: [PATCH] fix sql error when deleting a user without distribution lists --- addressbook/inc/class.addressbook_so.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index 73f1f3e3a3..a5f1b0a0ce 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -793,9 +793,9 @@ class addressbook_so { $this->somain->delete(array('owner' => $account_id)); // so_sql_cf::delete() takes care of cfs too - if(method_exists($this->somain, 'get_lists')) + if (method_exists($this->somain, 'get_lists') && + ($lists = $this->somain->get_lists($account_id))) { - $lists = $this->somain->get_lists($account_id); $this->somain->delete_list(array_keys($lists)); } }