Do not set response status in CLI in case of error

This commit is contained in:
Vincent Petry 2016-03-09 15:40:34 +01:00
parent 0cc53ee06d
commit 12b2192038
1 changed files with 3 additions and 1 deletions

View File

@ -509,7 +509,9 @@ class OC {
require_once $vendorAutoLoad;
} catch (\RuntimeException $e) {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
if (!self::$CLI) {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
}
// we can't use the template error page here, because this needs the
// DI container which isn't available yet
print($e->getMessage());