diff --git a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php index 5e0ce1151c..e7dbf0a17b 100644 --- a/addressbook/inc/class.addressbook_import_contacts_csv.inc.php +++ b/addressbook/inc/class.addressbook_import_contacts_csv.inc.php @@ -399,7 +399,7 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { protected function empty_addressbook($addressbook, $ids) { // Get all IDs in addressbook - $contacts = $this->bocontacts->search(array('owner' => $addressbook), true); + $contacts = $this->bocontacts->search(array('owner' => $addressbook), true) ?? []; $contacts = array_column($contacts, 'id'); $delete = array_diff($contacts, $ids); @@ -518,4 +518,4 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv { public function get_results() { return $this->results; } -} +} \ No newline at end of file