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
|
// Create a topic object
|
||||||
$topic = new Topic($this->topic);
|
$topic = new Topic($this->topic);
|
||||||
|
$ip = Net::pton("::1");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$ip = Net::pton($this->ip);
|
$ip = Net::pton($this->ip);
|
||||||
} catch (NetAddressTypeException $e) {
|
} catch (NetAddressTypeException $e) {
|
||||||
$ip = Net::pton("::1");
|
} catch (NetInvalidAddressException $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the post
|
// Update the post
|
||||||
|
|
|
@ -388,11 +388,12 @@ class User
|
||||||
$this->registerIp = Net::ntop($userRow->register_ip);
|
$this->registerIp = Net::ntop($userRow->register_ip);
|
||||||
} catch (NetAddressTypeException $e) {
|
} catch (NetAddressTypeException $e) {
|
||||||
$this->registerIp = $userRow->register_ip;
|
$this->registerIp = $userRow->register_ip;
|
||||||
|
$reg_ip = Net::pton("::1");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$reg_ip = Net::pton($this->registerIp);
|
$reg_ip = Net::pton($this->registerIp);
|
||||||
} catch (NetAddressTypeException $e) {
|
} catch (NetAddressTypeException $e) {
|
||||||
$reg_ip = Net::pton("::1");
|
} catch (NetInvalidAddressException $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::table('users')
|
DB::table('users')
|
||||||
|
@ -406,11 +407,12 @@ class User
|
||||||
$this->lastIp = Net::ntop($userRow->last_ip);
|
$this->lastIp = Net::ntop($userRow->last_ip);
|
||||||
} catch (NetAddressTypeException $e) {
|
} catch (NetAddressTypeException $e) {
|
||||||
$this->lastIp = $userRow->last_ip;
|
$this->lastIp = $userRow->last_ip;
|
||||||
|
$last_ip = Net::pton("::1");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$last_ip = Net::pton($this->lastIp);
|
$last_ip = Net::pton($this->lastIp);
|
||||||
} catch (NetAddressTypeException $e) {
|
} catch (NetAddressTypeException $e) {
|
||||||
$last_ip = Net::pton("::1");
|
} catch (NetInvalidAddressException $e) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DB::table('users')
|
DB::table('users')
|
||||||
|
|
Reference in a new issue