summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-10 17:58:01 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-10 17:58:01 +0100
commit7f16aaefc8ea52ce258742f02b0bbe70753eecb9 (patch)
treee006ccceb2a5dcfcb7fe39c53010ebdf0ae2b443 /apps/dav/lib
parentad61c552ea100d9118d2683940160484035f2e91 (diff)
parent6133253a2c95a5ca524aecf1fdeb85ab4d479d49 (diff)
downloadnextcloud-server-7f16aaefc8ea52ce258742f02b0bbe70753eecb9.tar.gz
nextcloud-server-7f16aaefc8ea52ce258742f02b0bbe70753eecb9.zip
Merge pull request #23048 from owncloud/no-fatal-error-if-DSTART-is-not-set
No fatal error if dstart is not set
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/caldav/caldavbackend.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/dav/lib/caldav/caldavbackend.php b/apps/dav/lib/caldav/caldavbackend.php
index 521d1b1de5e..fdfc8c399ed 100644
--- a/apps/dav/lib/caldav/caldavbackend.php
+++ b/apps/dav/lib/caldav/caldavbackend.php
@@ -1294,7 +1294,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
if (!$componentType) {
throw new \Sabre\DAV\Exception\BadRequest('Calendar objects must have a VJOURNAL, VEVENT or VTODO component');
}
- if ($componentType === 'VEVENT') {
+ if ($componentType === 'VEVENT' && $component->DTSTART) {
$firstOccurence = $component->DTSTART->getDateTime()->getTimeStamp();
// Finding the last occurence is a bit harder
if (!isset($component->RRULE)) {
@@ -1333,7 +1333,7 @@ class CalDavBackend extends AbstractBackend implements SyncSupport, Subscription
'etag' => md5($calendarData),
'size' => strlen($calendarData),
'componentType' => $componentType,
- 'firstOccurence' => $firstOccurence,
+ 'firstOccurence' => is_null($firstOccurence) ? null : max(0, $firstOccurence),
'lastOccurence' => $lastOccurence,
'uid' => $uid,
];