From 0b1b12c8a254a9fee7050f415ea7f12f4b354790 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 9 Dec 2019 16:08:13 +0100 Subject: Verify that is an array before accessing it Signed-off-by: Georg Ehrke --- apps/dav/lib/CalDAV/CalDavBackend.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/dav/lib/CalDAV') diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index b7dff4be3ac..237c604f661 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -445,7 +445,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription return $this->userDisplayNames[$uid]; } - + /** * @return array */ @@ -1238,7 +1238,9 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription $stmt = $this->db->prepare('DELETE FROM `*PREFIX*calendarobjects` WHERE `calendarid` = ? AND `uri` = ? AND `calendartype` = ?'); $stmt->execute([$calendarId, $objectUri, $calendarType]); - $this->purgeProperties($calendarId, $data['id'], $calendarType); + if (is_array($data)) { + $this->purgeProperties($calendarId, $data['id'], $calendarType); + } $this->addChange($calendarId, $objectUri, 3, $calendarType); } -- cgit v1.2.3