diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index e29749c596e21..e1cefc2b1167a 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2203,6 +2203,11 @@ public function getCalendarObjectByUID($principalUri, $uid) { $stmt->closeCursor(); if ($row) { if ($row['principaluri'] != $principalUri) { + /** + * This seeems to be a false positive: we have "use Sabre\Uri" and Uri\split() IS defined. + * + * @psalm-suppress UndefinedFunction + */ [, $name] = Uri\split($row['principaluri']); $calendarUri = $row['calendaruri'] . '_shared_by_' . $name; } else { diff --git a/apps/dav/lib/CalDAV/Schedule/Plugin.php b/apps/dav/lib/CalDAV/Schedule/Plugin.php index 8045421b89896..67ca1c739be0f 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -167,6 +167,7 @@ public function calendarObjectChange(RequestInterface $request, ResponseInterfac return; } + /** @var Calendar $calendarNode */ $calendarNode = $this->server->tree->getNodeForPath($calendarPath); // Original code in parent class: @@ -180,13 +181,22 @@ public function calendarObjectChange(RequestInterface $request, ResponseInterfac $calendarNode->getPrincipalURI() ); + /** @var VCalendar $oldObj */ if (!$isNew) { + /** @var \Sabre\CalDAV\CalendarObject $node */ $node = $this->server->tree->getNodeForPath($request->getPath()); $oldObj = Reader::read($node->get()); } else { $oldObj = null; } + /** + * Sabre has several issues with faulty argument type specifications + * in its doc-block comments. Passing null is ok here. + * + * @psalm-suppress PossiblyNullArgument + * @psalm-suppress ArgumentTypeCoercion + */ $this->processICalendarChange($oldObj, $vCal, $addresses, [], $modified); if ($oldObj) {