Skip to content

Commit d642bf4

Browse files
authored
Merge pull request #54053 from nextcloud/backport/54016/stable31
2 parents 93c1d49 + 9f8064a commit d642bf4

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

lib/private/Calendar/Manager.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,10 @@ public function handleIMipReply(
403403
}
404404

405405
if (empty($found)) {
406-
$this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
406+
$this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
407+
'principalUri' => $principalUri,
408+
'eventUid' => $vEvent->{'UID'}->getValue(),
409+
]);
407410
return false;
408411
}
409412

@@ -518,7 +521,10 @@ public function handleIMipCancel(
518521
}
519522

520523
if (empty($found)) {
521-
$this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $vEvent->{'UID'}->getValue());
524+
$this->logger->warning('iMip message event could not be processed because no corresponding event was found in any calendar', [
525+
'principalUri' => $principalUri,
526+
'eventUid' => $vEvent->{'UID'}->getValue(),
527+
]);
522528
return false;
523529
}
524530

tests/lib/Calendar/ManagerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ public function testHandleImipReplyEventNotFound(): void {
10771077
$calendarData->add('METHOD', 'REPLY');
10781078
// construct logger return
10791079
$this->logger->expects(self::once())->method('warning')
1080-
->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
1080+
->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
10811081
// Act
10821082
$result = $manager->handleIMipReply($principalUri, $sender, $recipient, $calendarData->serialize());
10831083
// Assert
@@ -1525,7 +1525,7 @@ public function testHandleImipCancelEventNotFound(): void {
15251525
$calendarData->add('METHOD', 'CANCEL');
15261526
// construct logger return
15271527
$this->logger->expects(self::once())->method('warning')
1528-
->with('iMip message event could not be processed because no corresponding event was found in any calendar ' . $principalUri . 'and UID' . $calendarData->VEVENT->UID->getValue());
1528+
->with('iMip message event could not be processed because no corresponding event was found in any calendar', ['principalUri' => $principalUri, 'eventUid' => $calendarData->VEVENT->UID->getValue()]);
15291529
// Act
15301530
$result = $manager->handleIMipCancel($principalUri, $sender, $replyTo, $recipient, $calendarData->serialize());
15311531
// Assert

0 commit comments

Comments
 (0)