ip_version() now returns int instead of string
diff --git a/system/core/Input.php b/system/core/Input.php
index ac67aaf..36ff96d 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -383,7 +383,7 @@
*/
public function valid_ip($ip)
{
- if ($this->ip_version($ip) === '4')
+ if ($this->ip_version($ip) === 4)
{
return (bool) filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4);
}
@@ -399,11 +399,11 @@
* Return ip version
*
* @param string
- * @return string
+ * @return int
*/
public function ip_version($ip)
{
- return strpos($ip, ":") === false ? '4' : '6';
+ return strpos($ip, ":") === false ? 4 : 6;
}
// --------------------------------------------------------------------