mirror of
https://github.com/processwire/processwire.git
synced 2025-08-26 08:04:38 +02:00
Update for processwire/processwire-issues#358 to prevent port 443 from being appended to undefined $config->httpHost when scheme is HTTPS.
This commit is contained in:
@@ -313,7 +313,8 @@ class ProcessWire extends Wire {
|
|||||||
protected function getHttpHost(Config $config) {
|
protected function getHttpHost(Config $config) {
|
||||||
|
|
||||||
$httpHosts = $config->httpHosts;
|
$httpHosts = $config->httpHosts;
|
||||||
$port = (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80) ? (':' . ((int) $_SERVER['SERVER_PORT'])) : '';
|
$port = isset($_SERVER['SERVER_PORT']) ? (int) $_SERVER['SERVER_PORT'] : 80;
|
||||||
|
$port = ($port === 80 || $port === 443 ? "" : ":$port");
|
||||||
$host = '';
|
$host = '';
|
||||||
|
|
||||||
if(is_array($httpHosts) && count($httpHosts)) {
|
if(is_array($httpHosts) && count($httpHosts)) {
|
||||||
|
Reference in New Issue
Block a user