summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/functions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php
index fabe5518..1b324a79 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -61,7 +61,7 @@
$__ip = $_SERVER['REMOTE_ADDR'];
// ::ffff:0.0.0.0
- if(preg_match('/^\:\:ffff\:(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
+ if(preg_match('/^\:\:(ffff\:)?(\d+\.\d+\.\d+\.\d+)$/', $__ip, $m))
$_SERVER['REMOTE_ADDR'] = $m[1];
}
}