1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-12 19:54:12 +02:00

trying to fix two conversion issues

- anonymous user not entered correctly or entered with user id 0 (need to be tested)
- ips not converted


git-svn-id: file:///svn/phpbb/trunk@7034 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2007-02-22 16:20:11 +00:00
parent 87c3b60b17
commit 97a8eb4013
4 changed files with 59 additions and 13 deletions

View File

@@ -309,10 +309,10 @@ function decode_ip($int_ip)
$hexipbang = explode('.', chunk_split($int_ip, 2, '.'));
// Any mod changing the way ips are stored? Then we are not able to convert.
if (sizeof($hexipbang) != 4)
// Any mod changing the way ips are stored? Then we are not able to convert...
if (sizeof($hexipbang) < 4)
{
return '';
return '127.0.0.1';
}
return hexdec($hexipbang[0]) . '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]);