Merge pull request #23071 from owncloud/backport-23032-no-response-on-cli

[9.0] Do not set response status in CLI in case of error
This commit is contained in:
Thomas Müller 2016-03-10 10:54:25 +01:00
commit 85168315ab

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());