summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2019-12-09 16:08:13 +0100
committerGeorg Ehrke <developer@georgehrke.com>2019-12-09 16:08:13 +0100
commit0b1b12c8a254a9fee7050f415ea7f12f4b354790 (patch)
treea87abede9f0705f2fde345953903d7c498600f4c /apps/dav
parentbb8ac6ca34aa84a9c43fb841a863438b025120a1 (diff)
downloadnextcloud-server-0b1b12c8a254a9fee7050f415ea7f12f4b354790.tar.gz
nextcloud-server-0b1b12c8a254a9fee7050f415ea7f12f4b354790.zip
Verify that is an array before accessing it
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/CalDavBackend.php6
1 files changed, 4 insertions, 2 deletions
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);
}