we have no hostname on cli (phar)

This commit is contained in:
Christian Weiske 2011-08-10 18:02:45 +02:00
parent 72db833930
commit ddcf7cd2a3

View File

@ -71,8 +71,12 @@ class SemanticScuttle_Config
*/
public function findFiles()
{
//use basename to prevent path injection
$host = basename($_SERVER['HTTP_HOST']);
if (isset($_SERVER['HTTP_HOST'])) {
//use basename to prevent path injection
$host = basename($_SERVER['HTTP_HOST']);
} else {
$host = 'cli';
}
$datadir = $this->getDataDir();
$openbase = ini_get('open_basedir');