diff options
Diffstat (limited to 'controller/notescontroller.php')
| -rw-r--r-- | controller/notescontroller.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/controller/notescontroller.php b/controller/notescontroller.php index 02bfc93..5618bcb 100644 --- a/controller/notescontroller.php +++ b/controller/notescontroller.php @@ -58,6 +58,11 @@ class NotesController extends Controller public function xml($guid) { $note = $this->getNotes()->load($guid, false); + if ($note === null) { + $res = new ErrorResponse('Note does not exist'); + $res->setStatus(\OCP\AppFramework\Http::STATUS_NOT_FOUND); + return $res; + } $xw = new \XMLWriter(); $xw->openMemory(); |
