mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
fix TypeError: array_column(): Argument #1 ($array) must be of type array, null given (0)
This commit is contained in:
parent
a61323f98c
commit
06e7518cd8
@ -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);
|
||||||
@ -518,4 +518,4 @@ class addressbook_import_contacts_csv extends importexport_basic_import_csv {
|
|||||||
public function get_results() {
|
public function get_results() {
|
||||||
return $this->results;
|
return $this->results;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user