Merge pull request #18301 from nextcloud/bugfix/noid/fix_array_access_on_non_array
Verify that is an array before accessing it
This commit is contained in:
commit
58da7c585e
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue