Merge pull request #22 from nextcloud/fix-3rdparty-notice-stable9

[stable9] Print error message again, when 3rdparty submodule is not initialized
This commit is contained in:
Marius 2016-06-08 13:25:56 +02:00
commit 73a9afed6d
1 changed files with 3 additions and 1 deletions

View File

@ -513,7 +513,9 @@ class OC {
} catch (\RuntimeException $e) {
if (!self::$CLI) {
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
$claimedProtocol = strtoupper($_SERVER['SERVER_PROTOCOL']);
$protocol = in_array($claimedProtocol, ['HTTP/1.0', 'HTTP/1.1', 'HTTP/2']) ? $claimedProtocol : 'HTTP/1.1';
header($protocol . ' ' . 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