Gere les variable quand on est dans un script (donc sans $_SERVER)

This commit is contained in:
Alan Garcia 2014-01-30 17:34:20 +00:00
parent f91898b537
commit 0f4da7e62a
1 changed files with 6 additions and 1 deletions

View File

@ -59,7 +59,12 @@ class m_variables {
} else {
$mid = null;
}
return $this->get_impersonated($_SERVER['HTTP_HOST'], $mid);
if (isset($_SERVER['HTTP_HOST'])) {
$host=$_SERVER['HTTP_HOST'];
} else {
$host=null;
}
return $this->get_impersonated($host, $mid);
}