diff --git a/lib/Service/NoteService.php b/lib/Service/NoteService.php index 9e0a96c..5978277 100644 --- a/lib/Service/NoteService.php +++ b/lib/Service/NoteService.php @@ -245,7 +245,7 @@ class NoteService { $dbAttachts = $this->attachMapper->findFromNote($userId, $id); foreach ($dbAttachts as $dbAttach) { $delete = true; - foreach ($attachts as $attach) { + foreach ($attachments as $attach) { if ($dbAttach->getFileId() === $attach['file_id']) { $delete = false; break;