summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2019-11-26 12:20:35 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2020-01-14 08:15:00 +0000
commit5e1e80fc40687f2c998400af41ff5257e3f7c7a0 (patch)
tree769b287c1d087f252004baa6c74140e903fe8124 /apps
parentd6d299923f6fcc653d3648c2e0469794562a8b4d (diff)
downloadnextcloud-server-5e1e80fc40687f2c998400af41ff5257e3f7c7a0.tar.gz
nextcloud-server-5e1e80fc40687f2c998400af41ff5257e3f7c7a0.zip
Properly handle resources in ReminderService
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps')
-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 dd19c400720..b163c2ad4b6 100644
--- a/apps/dav/lib/CalDAV/Reminder/ReminderService.php
+++ b/apps/dav/lib/CalDAV/Reminder/ReminderService.php
@@ -107,7 +107,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;
@@ -176,8 +180,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;
}