Fix PHP warnings

This commit is contained in:
Aleksander Machniak 2023-04-10 12:51:43 +02:00
parent d13f808854
commit 06209ca559

View file

@ -524,7 +524,7 @@ class carddav_contacts extends rcube_addressbook
$this->_fetch_groups();
$count = count($this->distlists[$this->gid]['member']);
}
else if (is_array($this->filter['ids'])) {
else if (isset($this->filter['ids']) && is_array($this->filter['ids'])) {
$count = count($this->filter['ids']);
}
else {
@ -728,6 +728,7 @@ class carddav_contacts extends rcube_addressbook
}
else {
// remove from distribution lists
if (isset($this->groupmembers[$id])) {
foreach ((array) $this->groupmembers[$id] as $gid) {
if (!$is_mailto || $gid == $this->gid) {
$this->remove_from_group($gid, $id);
@ -736,6 +737,8 @@ class carddav_contacts extends rcube_addressbook
// clear internal cache
unset($this->groupmembers[$id]);
}
$count++;
}
}