Skip to content

Commit c6e0ffa

Browse files
authored
Merge pull request #624 from humhub/v1.7
V1.7
2 parents fa59f83 + 3cc0b08 commit c6e0ffa

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

docs/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Changelog
55
-----------------------
66
- Fix #609: Fix for PHP 8.4
77
- Fix #621: Implemented `module-coding-standards`
8+
- Fix #620: Fix CalendarQuery error
89

910
1.8.3 (October 9, 2025)
1011
-----------------------
@@ -30,9 +31,10 @@ Changelog
3031
- Enh #549: Migration to Bootstrap 5 for HumHub 1.18
3132
- Enh #378: Use new content state service
3233

33-
1.7.20 (Unreleased)
34-
---------------------------
34+
1.7.20 (October 20, 2025)
35+
-------------------------
3536
- Enh #608: Improved `Upcoming events` widget to include events from followed spaces and profiles
37+
- Enh #618: Fixed a PHP error that occurred while fetching `organizer` of `Recurrence item`
3638

3739
1.7.19 (September 26, 2025)
3840
---------------------------

interfaces/VCalendar.php

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -245,28 +245,30 @@ private function addVEvent(CalendarEventIF $item, bool $isRecurrenceChild = fals
245245
}
246246
}
247247

248-
$organizer = $item->getOrganizer();
249-
if ($organizer instanceof User) {
250-
$evt->add(
251-
'ORGANIZER;CN=' . $this->getCN($organizer),
252-
'mailto:' . $this->getMailto($organizer),
253-
);
248+
$eventType = $item->getEventType();
249+
250+
if ($eventType instanceof CalendarEntryType && !empty($category = $eventType->name)) {
251+
$evt->add('CATEGORIES', $category);
254252
}
255253

256-
if ($this->includeParticipantInfo && $item instanceof CalendarEventParticipationIF) {
257-
foreach ($item->findParticipants()->limit(self::MAX_PARTICIPANTS_COUNT)->all() as $participant) {
258-
/* @var $user User */
254+
if ($item instanceof CalendarEventParticipationIF) {
255+
$organizer = $item->getOrganizer();
256+
if ($organizer instanceof User) {
259257
$evt->add(
260-
'ATTENDEE;CN=' . $this->getCN($participant),
261-
'mailto:' . $this->getMailto($participant),
258+
'ORGANIZER;CN=' . $this->getCN($organizer),
259+
'mailto:' . $this->getMailto($organizer),
262260
);
263261
}
264-
}
265262

266-
$eventType = $item->getEventType();
267-
268-
if ($eventType instanceof CalendarEntryType && !empty($category = $eventType->name)) {
269-
$evt->add('CATEGORIES', $category);
263+
if ($this->includeParticipantInfo) {
264+
foreach ($item->findParticipants()->limit(self::MAX_PARTICIPANTS_COUNT)->all() as $participant) {
265+
/* @var $user User */
266+
$evt->add(
267+
'ATTENDEE;CN=' . $this->getCN($participant),
268+
'mailto:' . $this->getMailto($participant),
269+
);
270+
}
271+
}
270272
}
271273

272274
return $this;

0 commit comments

Comments
 (0)