Skip to content

Commit

Permalink
Merge pull request #7816 from jdarwood007/ServerProto
Browse files Browse the repository at this point in the history
  • Loading branch information
Sesquipedalian authored Jul 31, 2023
2 parents 84e74d0 + 3c2c400 commit 05b3e67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Subs.php
Original file line number Diff line number Diff line change
Expand Up @@ -8170,7 +8170,7 @@ function send_http_status($code, $status = '')
503 => 'Service Unavailable',
);

$protocol = preg_match('~^\s*(HTTP/[12]\.\d)\s*$~i', $_SERVER['SERVER_PROTOCOL'], $matches) ? $matches[1] : 'HTTP/1.0';
$protocol = !empty($_SERVER['SERVER_PROTOCOL']) && preg_match('~^\s*(HTTP/[12]\.\d)\s*$~i', $_SERVER['SERVER_PROTOCOL'], $matches) ? $matches[1] : 'HTTP/1.0';

// Typically during these requests, we have cleaned the response (ob_*clean), ensure these headers exist.
require_once($sourcedir . '/Security.php');
Expand Down

0 comments on commit 05b3e67

Please sign in to comment.