From 23577db488d2706e4ffab4be1592b528086d692c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 25 Feb 2007 13:21:59 +0000 Subject: [PATCH] this hopefully solves the issue of wrongly converted ips completely. Sometimes there is really no ip... git-svn-id: file:///svn/phpbb/trunk@7063 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_convert.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/functions_convert.php b/phpBB/includes/functions_convert.php index 0884ef01e8..87fe1c2649 100644 --- a/phpBB/includes/functions_convert.php +++ b/phpBB/includes/functions_convert.php @@ -304,15 +304,15 @@ function decode_ip($int_ip) { if (!$int_ip) { - return '127.0.0.1'; + return $int_ip; } $hexipbang = explode('.', chunk_split($int_ip, 2, '.')); - // Any mod changing the way ips are stored? Then we are not able to convert... + // Any mod changing the way ips are stored? Then we are not able to convert and enter the ip "as is" to not "destroy" anything... if (sizeof($hexipbang) < 4) { - return '127.0.0.1'; + return $int_ip; } return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);