Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'public.php')
-rw-r--r--public.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/public.php b/public.php
index 42fd2e9f602..c81a6b5a960 100644
--- a/public.php
+++ b/public.php
@@ -79,16 +79,15 @@ try {
} catch (Exception $ex) {
if ($ex instanceof \OC\ServiceUnavailableException) {
- OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
+ $status = OC_Response::STATUS_SERVICE_UNAVAILABLE;
} else {
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
+ $status = OC_Response::STATUS_INTERNAL_SERVER_ERROR;
}
//show the user a detailed error page
\OC::$server->getLogger()->logException($ex, ['app' => 'public']);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, $status);
} catch (Error $ex) {
//show the user a detailed error page
- OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
\OC::$server->getLogger()->logException($ex, ['app' => 'public']);
- OC_Template::printExceptionErrorPage($ex);
+ OC_Template::printExceptionErrorPage($ex, OC_Response::STATUS_INTERNAL_SERVER_ERROR);
}