diff options
author | Georg Ehrke <developer@georgehrke.com> | 2019-11-26 12:20:35 +0100 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2019-11-26 12:20:35 +0100 |
commit | 05e47af6b2b04caf91d52e83783413e091b4d399 (patch) | |
tree | 677f0ee63bfa6f6ddbe524a5730669d244bbf3b8 | |
parent | e3bee2cb782b4897e4822c909d1dbbf2637f7b65 (diff) | |
download | nextcloud-server-05e47af6b2b04caf91d52e83783413e091b4d399.tar.gz nextcloud-server-05e47af6b2b04caf91d52e83783413e091b4d399.zip |
Properly handle resources in ReminderService
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/ReminderService.php | 12 |
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 3c815801c96..314c7a2b50b 100644 --- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php +++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php @@ -108,7 +108,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; @@ -177,8 +181,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; } |