fix some SERVER_NAME references
This commit is contained in:
@@ -1630,10 +1630,11 @@ class System
|
||||
public static function getServerHostname()
|
||||
{
|
||||
$host = "";
|
||||
if (!empty($_SERVER['SERVER_NAME'])) {
|
||||
$host = $_SERVER['SERVER_NAME'];
|
||||
} else if (defined('SERVER_NAME')) {
|
||||
if (defined('SERVER_NAME')) {
|
||||
$host = SERVER_NAME;
|
||||
} else {
|
||||
$hostParts = explode(':', $_SERVER['HTTP_HOST'] ?? '');
|
||||
$host = isset($hostParts[0]) ? $hostParts[0] : $_SERVER['SERVER_NAME'];
|
||||
}
|
||||
return $host;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user