From 2dd4cc5509322bea4a3c0b506932d01fc69f7e64 Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Thu, 31 Oct 2013 11:19:33 -0500 Subject: [PATCH] [zendframework/zf2#5374] Fix CS issues - trailing whitespace --- src/PhpEnvironment/RemoteAddress.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/PhpEnvironment/RemoteAddress.php b/src/PhpEnvironment/RemoteAddress.php index 4941b5dca6..e42bad444a 100644 --- a/src/PhpEnvironment/RemoteAddress.php +++ b/src/PhpEnvironment/RemoteAddress.php @@ -101,7 +101,7 @@ public function getIpAddress() if ($ip) { return $ip; } - + // direct IP address if (isset($_SERVER['REMOTE_ADDR'])) { return $_SERVER['REMOTE_ADDR']; @@ -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; @@ -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;