From f3743685685cce57d385b92b363ece0520e4f823 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 9 Mar 2016 15:40:34 +0100 Subject: Do not set response status in CLI in case of error --- lib/base.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/base.php b/lib/base.php index b462a49fc9b..a315ad13a04 100644 --- a/lib/base.php +++ b/lib/base.php @@ -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()); -- cgit v1.2.3