Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Service/NotesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@
* @throws NoteDoesNotExistException
*/
private static function getFileById(string $customExtension, Folder $folder, int $id) : File {
$file = $folder->getById($id);
$file = $folder->getFirstNodeById($id);

Check failure on line 213 in lib/Service/NotesService.php

View workflow job for this annotation

GitHub Actions / static-psalm-analysis dev-stable28

UndefinedInterfaceMethod

lib/Service/NotesService.php:213:20: UndefinedInterfaceMethod: Method OCP\Files\Folder::getFirstNodeById does not exist (see https://psalm.dev/181)

if (!array_key_exists(0, $file) || !($file[0] instanceof File) || !self::isNote($file[0], $customExtension)) {
if (!($file instanceof File) || !self::isNote($file, $customExtension)) {
throw new NoteDoesNotExistException();
}
return $file[0];
return $file;
}

/**
Expand Down
Loading