Skip to content

Commit bc8fe82

Browse files
committed
Merge pull request #20 from nextcloud/fix-3rdparty-notice
Print error message again, when 3rdparty submodule is not initialized
2 parents 1aa7db5 + 39aeebf commit bc8fe82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/base.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,9 @@ public static function init() {
501501

502502
} catch (\RuntimeException $e) {
503503
if (!self::$CLI) {
504-
OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE);
504+
$claimedProtocol = strtoupper($_SERVER['SERVER_PROTOCOL']);
505+
$protocol = in_array($claimedProtocol, ['HTTP/1.0', 'HTTP/1.1', 'HTTP/2']) ? $claimedProtocol : 'HTTP/1.1';
506+
header($protocol . ' ' . OC_Response::STATUS_SERVICE_UNAVAILABLE);
505507
}
506508
// we can't use the template error page here, because this needs the
507509
// DI container which isn't available yet

0 commit comments

Comments
 (0)