Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/5374-cleanup' into develop
Browse files Browse the repository at this point in the history
Forward-ports testing and CS fixes for zendframework/zendframework#5374
  • Loading branch information
weierophinney committed Oct 31, 2013
3 parents fa17926 + b653ea9 + 2dd4cc5 commit f8c3502
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PhpEnvironment/RemoteAddress.php
Expand Up @@ -101,7 +101,7 @@ public function getIpAddress()
if ($ip) {
return $ip;
}

// direct IP address
if (isset($_SERVER['REMOTE_ADDR'])) {
return $_SERVER['REMOTE_ADDR'];
Expand All @@ -118,7 +118,7 @@ public function getIpAddress()
*/
protected function getIpAddressFromProxy()
{
if (!$this->useProxy
if (!$this->useProxy
|| !in_array($_SERVER['REMOTE_ADDR'], $this->trustedProxies)
) {
return false;
Expand All @@ -135,7 +135,7 @@ protected function getIpAddressFromProxy()
$ips = array_map('trim', $ips);
// remove trusted proxy IPs
$ips = array_diff($ips, $this->trustedProxies);

// Any left?
if (empty($ips)) {
return false;
Expand Down

0 comments on commit f8c3502

Please sign in to comment.