diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2011-09-12 08:35:32 +0200 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2011-09-12 08:35:32 +0200 |
commit | 4ddee144b3493eaceeed6ca9eb6138c881f43eac (patch) | |
tree | b7806719ac4abec82567e6b7a6ef165b2a7b6204 /system/core/Input.php | |
parent | 4db872f861dbf48b55749c53c504481f99db3551 (diff) |
Update: check filter_var function exist
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-x | system/core/Input.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 2395501f3..2b36ea3c7 100755 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -374,7 +374,7 @@ class CI_Input { public function valid_ip($ip) { // if php version >= 5.2, use filter_var to check validate ip. - if(is_php('5.2')) + if(function_exists('filter_var')) { return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); } |