From 43bb78aeec2d538562da53cf71973dfe72e16838 Mon Sep 17 00:00:00 2001 From: ralf Date: Thu, 13 Jul 2023 10:22:59 +0200 Subject: [PATCH] fix TypeError: array_column(): Argument #1 ($array) must be of type array, null given (0) --- addressbook/inc/class.addressbook_import_contacts_csv.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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