diff options
author | Nate Silva <nate@natesilva.com> | 2015-11-06 16:06:28 +0100 |
---|---|---|
committer | Nate Silva <nate@natesilva.com> | 2015-11-06 16:06:28 +0100 |
commit | 4ccf88dc97d009e3421b79c351e426d31fc11b41 (patch) | |
tree | 94ab1186a400e5cdf4aea49b847d8df483052f86 /system/core | |
parent | 845ed89709f84d56edeeb91e877f585a5798006d (diff) |
Simpler way to detect an IPv6 address (strpos)
Diffstat (limited to 'system/core')
-rw-r--r-- | system/core/Config.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/core/Config.php b/system/core/Config.php index dfef8dbe4..87ed32aca 100644 --- a/system/core/Config.php +++ b/system/core/Config.php @@ -90,7 +90,7 @@ class CI_Config { { if (isset($_SERVER['SERVER_ADDR'])) { - if ((bool) filter_var($_SERVER['SERVER_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + if (strpos($_SERVER['SERVER_ADDR'], ':') !== FALSE) { $server_addr = '[' . $_SERVER['SERVER_ADDR'] . ']'; } |