diff --git a/apps/dav/lib/CalDAV/CalDavBackend.php b/apps/dav/lib/CalDAV/CalDavBackend.php index e8adbee35c728..cb440eef1a11b 100644 --- a/apps/dav/lib/CalDAV/CalDavBackend.php +++ b/apps/dav/lib/CalDAV/CalDavBackend.php @@ -2178,6 +2178,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 2080aa2b1c2c1..8a112979091dc 100644 --- a/apps/dav/lib/CalDAV/Schedule/Plugin.php +++ b/apps/dav/lib/CalDAV/Schedule/Plugin.php @@ -168,6 +168,7 @@ public function calendarObjectChange(RequestInterface $request, ResponseInterfac return; } + /** @var Calendar $calendarNode */ $calendarNode = $this->server->tree->getNodeForPath($calendarPath); // Original code in parent class: @@ -181,13 +182,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) {