diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php
index <HASH>..<HASH> 100644
--- a/lib/Cake/Utility/Validation.php
+++ b/lib/Cake/Utility/Validation.php
@@ -467,7 +467,7 @@ class Validation {
  */
 	public static function ip($check, $type = 'both') {
 		$type = strtolower($type);
-		$flags = null;
+		$flags = 0;
 		if ($type === 'ipv4' || $type === 'both') {
 			$flags |= FILTER_FLAG_IPV4;
 		}
Don't |= with null.