attempt two at "fixing"

This commit is contained in:
Pachira 2017-03-22 21:25:36 +01:00
parent 583bd5f915
commit 168e96187d
2 changed files with 6 additions and 3 deletions

View file

@ -189,11 +189,12 @@ class Post
{
// Create a topic object
$topic = new Topic($this->topic);
$ip = Net::pton("::1");
try {
$ip = Net::pton($this->ip);
} catch (NetAddressTypeException $e) {
$ip = Net::pton("::1");
} catch (NetInvalidAddressException $e) {
}
// Update the post

View file

@ -388,11 +388,12 @@ class User
$this->registerIp = Net::ntop($userRow->register_ip);
} catch (NetAddressTypeException $e) {
$this->registerIp = $userRow->register_ip;
$reg_ip = Net::pton("::1");
try {
$reg_ip = Net::pton($this->registerIp);
} catch (NetAddressTypeException $e) {
$reg_ip = Net::pton("::1");
} catch (NetInvalidAddressException $e) {
}
DB::table('users')
@ -406,11 +407,12 @@ class User
$this->lastIp = Net::ntop($userRow->last_ip);
} catch (NetAddressTypeException $e) {
$this->lastIp = $userRow->last_ip;
$last_ip = Net::pton("::1");
try {
$last_ip = Net::pton($this->lastIp);
} catch (NetAddressTypeException $e) {
$last_ip = Net::pton("::1");
} catch (NetInvalidAddressException $e) {
}
DB::table('users')