diff --git a/src/mako/http/Request.php b/src/mako/http/Request.php
index <HASH>..<HASH> 100644
--- a/src/mako/http/Request.php
+++ b/src/mako/http/Request.php
@@ -842,10 +842,12 @@ class Request
 
 			if(!empty($this->trustedProxies))
 			{
-				$ips = array_map('trim', explode(',', $this->server('HTTP_X_FORWARDED_FOR')));
+				$ips = $this->server('HTTP_X_FORWARDED_FOR');
 
 				if(!empty($ips))
 				{
+					$ips = array_map('trim', explode(',', $ips));
+
 					foreach($ips as $key => $value)
 					{
 						if(in_array($value, $this->trustedProxies))
Don't use HTTP_X_FORWARDED_FOR if it isn't set