Skip to content

Commit

Permalink
Print error message again, when 3rdparty submodule is not initialized
Browse files Browse the repository at this point in the history
- old code used Response which attempted to use OC::$server which is not
and cannot be intialised at this part of the code.
  • Loading branch information
blizzz committed Jun 8, 2016
1 parent fb49819 commit a49f5b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,9 @@ public static function init() {

} 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
Expand Down

0 comments on commit a49f5b7

Please sign in to comment.