Merge pull request #18880 from nextcloud/backport/18115/stable17
[stable17] Properly handle resources in ReminderService
This commit is contained in:
commit
46d89d6a4e
1 changed files with 10 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue