attempt two at "fixing"
This commit is contained in:
parent
583bd5f915
commit
168e96187d
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
Reference in a new issue