commit | 4ddee144b3493eaceeed6ca9eb6138c881f43eac | [log] [tgz] |
---|---|---|
author | Bo-Yi Wu <appleboy.tw@gmail.com> | Mon Sep 12 14:35:32 2011 +0800 |
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | Mon Sep 12 14:35:32 2011 +0800 |
tree | b7806719ac4abec82567e6b7a6ef165b2a7b6204 | |
parent | 4db872f861dbf48b55749c53c504481f99db3551 [diff] |
Update: check filter_var function exist
diff --git a/system/core/Input.php b/system/core/Input.php index 2395501..2b36ea3 100755 --- a/system/core/Input.php +++ b/system/core/Input.php
@@ -374,7 +374,7 @@ 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); }