"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "core-bundle/src/Resources/contao/library/Contao/Environment.php" between
contao-4.11.3.tar.gz and contao-4.11.4.tar.gz

About: Contao (fka TYPOlight) is a content management system (CMS). Latest release.

Environment.php  (contao-4.11.3):Environment.php  (contao-4.11.4)
skipping to change at line 299 skipping to change at line 299
* @return string The host name * @return string The host name
*/ */
protected static function httpHost() protected static function httpHost()
{ {
if (!empty($_SERVER['HTTP_HOST'])) if (!empty($_SERVER['HTTP_HOST']))
{ {
$host = $_SERVER['HTTP_HOST']; $host = $_SERVER['HTTP_HOST'];
} }
else else
{ {
$host = $_SERVER['SERVER_NAME']; $host = $_SERVER['SERVER_NAME'] ?? null;
if ($_SERVER['SERVER_PORT'] != 80) if (($_SERVER['SERVER_PORT'] ?? 80) != 80)
{ {
$host .= ':' . $_SERVER['SERVER_PORT']; $host .= ':' . $_SERVER['SERVER_PORT'];
} }
} }
return preg_replace('/[^A-Za-z0-9[\].:_-]/', '', $host); return preg_replace('/[^A-Za-z0-9[\].:_-]/', '', $host);
} }
/** /**
* Return the HTTP X-Forwarded-Host * Return the HTTP X-Forwarded-Host
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)