Added sanity check to resolve missing variable

Unsure why but as of this morning (perhaps because of upgrading to PHP 5.5.8
PHPUnit started barking about _SERVER['HTTP_HOST'] not being set.
This commit is contained in:
Joshua Sherman 2014-01-14 11:34:51 -05:00
parent da7a0de91f
commit 46b77fa1b1

View file

@ -100,7 +100,7 @@ class Config extends Object
// Exact match
if ((preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $host)
&& $_SERVER['SERVER_ADDR'] == $host)
|| $_SERVER['HTTP_HOST'] == $host)
|| (isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST'] == $host))
{
$environment = $name;
break;