Update pChart to 2.1.4, fix small bug in Basic class
For the host name set, if there is no data in the HTTP_HOST var, then set it to NA instead. Also default set to port 80 if no port info could be found.
This commit is contained in:
@@ -807,8 +807,11 @@
|
||||
// get the host name without the port as given by the SELF var
|
||||
public function get_host_name()
|
||||
{
|
||||
list($host_name, $port) = explode(":", $_SERVER['HTTP_HOST']);
|
||||
$this->host_port = $port;
|
||||
if ($_SERVER['HTTP_HOST'])
|
||||
list($host_name, $port) = explode(":", $_SERVER['HTTP_HOST']);
|
||||
else
|
||||
$host_name = 'NA';
|
||||
$this->host_port = $port ? $port : 80;
|
||||
return $host_name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user