Permalink
Browse files

Don't |= with null.

  • Loading branch information...
1 parent b2e8287 commit 963f1ca4493667877825eabb8971c4a6e19dc1fb @markstory markstory committed Jun 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Utility/Validation.php
View
2 lib/Cake/Utility/Validation.php
@@ -467,7 +467,7 @@ public static function extension($check, $extensions = array('gif', 'jpeg', 'png
*/
public static function ip($check, $type = 'both') {
$type = strtolower($type);
- $flags = null;
+ $flags = 0;
if ($type === 'ipv4' || $type === 'both') {
$flags |= FILTER_FLAG_IPV4;
}

0 comments on commit 963f1ca

Please sign in to comment.