Permalink
Browse files

* Check using a regular expression instead of is_numeric()

  Bug #6914


git-svn-id: http://svn.php.net/repository/pear/packages/Net_CheckIP/trunk@225062 c90b9560-bf6c-de11-be94-00142212c4b1
  • Loading branch information...
1 parent dd3a626 commit a8a2e8113e96d2e822ad059a89f60c4f0ef7a8e1 @mj mj committed Dec 15, 2006
Showing with 1 addition and 1 deletion.
  1. +1 −1 CheckIP.php
View
@@ -65,7 +65,7 @@ function check_ip($ip)
}
for ($i = 0; $i < 4; $i++) {
- if (!is_numeric($oct[$i])) {
+ if (!preg_match("/^[0-9]+$/", $oct[$i])) {
return false;
}

0 comments on commit a8a2e81

Please sign in to comment.