Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/proxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ protected function _gatherRequestInfo()
*/
protected function _loadRoute()
{
if(!key_exists('route', $_GET))
if(!isset($_GET['route']))
throw new Exception("You must supply a 'route' parameter in the request");

$this->_route = $_GET['route'];
Expand Down Expand Up @@ -256,7 +256,7 @@ protected function _loadRequestMethod()
{
if($this->_requestMethod !== NULL) return;

if(! key_exists('REQUEST_METHOD', $_SERVER))
if(! isset($_SERVER['REQUEST_METHOD']))
throw new Exception("Request method unknown");

$method = strtolower($_SERVER['REQUEST_METHOD']);
Expand All @@ -281,7 +281,7 @@ protected function _loadRequestUserAgent()
{
if($this->_requestUserAgent !== NULL) return;

if(! key_exists('HTTP_USER_AGENT', $_SERVER))
if(!isset($_SERVER['HTTP_USER_AGENT']))
throw new Exception("No HTTP User Agent was found");

$this->_requestUserAgent = $_SERVER['HTTP_USER_AGENT'];
Expand All @@ -305,7 +305,7 @@ protected function _loadContentType()
{
$this->_loadRawHeaders();

if(key_exists('Content-Type', $this->_rawHeaders))
if(isset($this->_rawHeaders['Content-Type']))
$this->_requestContentType = $this->_rawHeaders['Content-Type'];
}

Expand Down Expand Up @@ -336,7 +336,7 @@ protected function _checkPermissions()
if($this->_allowedHostnames === NULL)
return;

if(key_exists('REMOTE_HOST', $_SERVER))
if(isset($_SERVER['REMOTE_HOST']))
$host = $_SERVER['REMOTE_HOST'];
else
$host = $_SERVER['REMOTE_ADDR'];
Expand Down Expand Up @@ -579,7 +579,7 @@ protected function _buildProxyRequestCookieString()
{
$cookie_string = '';

if(key_exists('Cookie', $this->_rawHeaders))
if(isset($this->_rawHeaders['Cookie']))
$cookie_string = $this->_rawHeaders['Cookie'];

return $cookie_string;
Expand Down