aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-12-27 14:42:10 +0100
committerGitHub <noreply@github.com>2019-12-27 14:42:10 +0100
commitb7f93cc56bb1f7d9383165ebf29111fbd2bd6ab1 (patch)
tree9add18c50bd3249f12e1a5c219b93cbbe654d831 /apps/dav
parentf3232fc192ed119705685516f447589c79bfde6e (diff)
parent05e47af6b2b04caf91d52e83783413e091b4d399 (diff)
downloadnextcloud-server-b7f93cc56bb1f7d9383165ebf29111fbd2bd6ab1.tar.gz
nextcloud-server-b7f93cc56bb1f7d9383165ebf29111fbd2bd6ab1.zip
Merge pull request #18115 from nextcloud/bugfix/17951/reminderservice_resource_error
Properly handle resources in ReminderService
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/CalDAV/Reminder/ReminderService.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/ReminderService.php b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
index 7796eef7db6..17c2d02a716 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -112,7 +112,11 @@ class ReminderService {
$reminders = $this->backend->getRemindersToProcess();
foreach($reminders as $reminder) {
- $vcalendar = $this->parseCalendarData($reminder['calendardata']);
+ $calendarData = is_resource($reminder['calendardata'])
+ ? stream_get_contents($reminder['calendardata'])
+ : $reminder['calendardata'];
+
+ $vcalendar = $this->parseCalendarData($calendarData);
if (!$vcalendar) {
$this->backend->removeReminder($reminder['id']);
continue;
@@ -181,8 +185,12 @@ class ReminderService {
* @param array $objectData
*/
private function onCalendarObjectCreate(array $objectData):void {
+ $calendarData = is_resource($objectData['calendardata'])
+ ? stream_get_contents($objectData['calendardata'])
+ : $objectData['calendardata'];
+
/** @var VObject\Component\VCalendar $vcalendar */
- $vcalendar = $this->parseCalendarData($objectData['calendardata']);
+ $vcalendar = $this->parseCalendarData($calendarData);
if (!$vcalendar) {
return;
}