Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't |= with null.
  • Loading branch information
markstory committed Jun 11, 2012
1 parent b2e8287 commit 963f1ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Validation.php
Expand Up @@ -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;
}
Expand Down

0 comments on commit 963f1ca

Please sign in to comment.