php8 warnings

This commit is contained in:
Christian Mollekopf 2023-07-27 09:18:56 +02:00
parent c350c1ebbf
commit 5a8b8c5e74

View file

@ -345,7 +345,7 @@ abstract class kolab_format_xcal extends kolab_format
$reschedule = true; $reschedule = true;
} }
$this->obj->setSummary($object['title']); $this->obj->setSummary($object['title'] ?? null);
$this->obj->setLocation($object['location'] ?? null); $this->obj->setLocation($object['location'] ?? null);
$this->obj->setDescription($object['description'] ?? null); $this->obj->setDescription($object['description'] ?? null);
$this->obj->setPriority($object['priority'] ?? null); $this->obj->setPriority($object['priority'] ?? null);
@ -664,8 +664,9 @@ abstract class kolab_format_xcal extends kolab_format
if ($field) { if ($field) {
$a = array(); $a = array();
foreach ((array) $object[$col] as $attr) foreach ((array) $object[$col] as $attr) {
$a[] = $attr[$field]; $a[] = $attr[$field] ?? null;
}
$val = join(' ', $a); $val = join(' ', $a);
} }
else { else {