fix TypeError: array_column(): Argument #1 ($array) must be of type array, null given (0)

This commit is contained in:
ralf 2023-07-13 10:22:59 +02:00
parent a61323f98c
commit 06e7518cd8

View File

@ -399,7 +399,7 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
protected function empty_addressbook($addressbook, $ids) protected function empty_addressbook($addressbook, $ids)
{ {
// Get all IDs in addressbook // 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'); $contacts = array_column($contacts, 'id');
$delete = array_diff($contacts, $ids); $delete = array_diff($contacts, $ids);