Skip to content

Commit 7b6a731

Browse files
committed
allow undefined server protocol
1 parent 9d39d30 commit 7b6a731

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

resources/lib/UnitySite.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public static function redirect($destination)
3434

3535
private static function headerResponseCode(int $code, string $reason)
3636
{
37-
$msg = $_SERVER["SERVER_PROTOCOL"] . " " . strval($code) . " " . $reason;
37+
$protocol = @$_SERVER["SERVER_PROTOCOL"] ?? "HTTP/1.1";
38+
$msg = $protocol . " " . strval($code) . " " . $reason;
3839
header($msg, true, $code);
3940
}
4041

0 commit comments

Comments
 (0)