From 5a8b8c5e74f5a60a7a1f3d97d89def35abd3ca8f Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 27 Jul 2023 09:18:56 +0200 Subject: [PATCH] php8 warnings --- plugins/libkolab/lib/kolab_format_xcal.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/libkolab/lib/kolab_format_xcal.php b/plugins/libkolab/lib/kolab_format_xcal.php index a6ba7193..8a21ca5c 100644 --- a/plugins/libkolab/lib/kolab_format_xcal.php +++ b/plugins/libkolab/lib/kolab_format_xcal.php @@ -345,7 +345,7 @@ abstract class kolab_format_xcal extends kolab_format $reschedule = true; } - $this->obj->setSummary($object['title']); + $this->obj->setSummary($object['title'] ?? null); $this->obj->setLocation($object['location'] ?? null); $this->obj->setDescription($object['description'] ?? null); $this->obj->setPriority($object['priority'] ?? null); @@ -664,8 +664,9 @@ abstract class kolab_format_xcal extends kolab_format if ($field) { $a = array(); - foreach ((array) $object[$col] as $attr) - $a[] = $attr[$field]; + foreach ((array) $object[$col] as $attr) { + $a[] = $attr[$field] ?? null; + } $val = join(' ', $a); } else {