Browse Source

Merge pull request #776 from JesseObrien/develop

Request::ip() doesn't return default
Taylor Otwell 12 years ago
parent
commit
81efdcf157
1 changed files with 2 additions and 1 deletions
  1. 2 1
      laravel/request.php

+ 2 - 1
laravel/request.php

@@ -102,7 +102,8 @@ class Request {
 	 */
 	public static function ip($default = '0.0.0.0')
 	{
-		return value(static::foundation()->getClientIp(), $default);
+		$client_ip = static::foundation()->getClientIp();
+		return $client_ip === NULL ? $default : $client_ip;
 	}
 
 	/**