diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-06-17 15:36:54 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-06-17 15:39:57 +0200 |
commit | 0f7f5bdb34281b352d32aae32a3c3bb8886affb4 (patch) | |
tree | 9d9b114c89b264c7a1c066412ea8fa79520ac090 /apps | |
parent | dead1acba822cdc2d0b80e29c5559ba158f537ec (diff) | |
download | nextcloud-server-0f7f5bdb34281b352d32aae32a3c3bb8886affb4.tar.gz nextcloud-server-0f7f5bdb34281b352d32aae32a3c3bb8886affb4.zip |
Throw nicer error message instead 500
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_sharing/ajax/publicpreview.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php index 833bd1b4333..bf30f7fa179 100644 --- a/apps/files_sharing/ajax/publicpreview.php +++ b/apps/files_sharing/ajax/publicpreview.php @@ -48,7 +48,9 @@ $pathId = $linkedItem['file_source']; $path = $view->getPath($pathId); if($path === null) { - throw new \OCP\Files\NotFoundException(); + \OC_Response::setStatus(\OC_Response::STATUS_NOT_FOUND); + \OC_Log::write('core-preview', 'Could not resolve file for shared item', OC_Log::WARN); + exit; } $pathInfo = $view->getFileInfo($path); |