From a13532ab3062a088531afacb93a9f125602831f7 Mon Sep 17 00:00:00 2001 From: Daniel Aranda Date: Fri, 17 Apr 2015 14:00:14 -0400 Subject: [PATCH] Swap HTTP_HOST with server name. Fixes #8 --- core/PHPRocks/Environment.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/PHPRocks/Environment.php b/core/PHPRocks/Environment.php index b80f8b1..ee4b00a 100644 --- a/core/PHPRocks/Environment.php +++ b/core/PHPRocks/Environment.php @@ -101,10 +101,10 @@ public function domain(){ return self::CLI; } - $server_name = $this->server->get("SERVER_NAME"); + $server_name = $this->server->get('HTTP_HOST'); if( is_null($server_name) ){ - $server_name = $this->server->get("HTTP_HOST"); + $server_name = $this->server->get('SERVER_NAME'); } if( is_null($server_name) ){