diff --git a/appinfo/info.xml b/appinfo/info.xml
index 1af207112..25a7e95a4 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -25,8 +25,8 @@ The Notes app is a distraction free notes taking app for [Nextcloud](https://www
https://github.com/nextcloud/notes.git
https://raw.githubusercontent.com/nextcloud/screenshots/master/apps/Notes/notes.png
-
-
+
+
diff --git a/lib/Service/NotesService.php b/lib/Service/NotesService.php
index 9eb955b9e..52badad06 100644
--- a/lib/Service/NotesService.php
+++ b/lib/Service/NotesService.php
@@ -290,12 +290,12 @@ private function getCustomExtension(string $userId) {
* @throws NoteDoesNotExistException
*/
private static function getFileById(string $customExtension, Folder $folder, int $id) : File {
- $file = $folder->getById($id);
+ $file = $folder->getFirstNodeById($id);
- 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;
}
/**
diff --git a/psalm.xml b/psalm.xml
index 160e85efe..83f2ebcf6 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -5,7 +5,7 @@
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
errorBaseline="tests/psalm-baseline.xml"
- phpVersion="8.0"
+ phpVersion="8.1"
>